Ahmed235 commited on
Commit
9ad6938
1 Parent(s): e993aed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -36,14 +36,13 @@ def predict_pptx_content(file_path):
36
  predicted_probability = result[0]['score']
37
  summary = summarizer(extracted_text, max_length=1000, min_length=30, do_sample=False)[0]['summary_text']
38
 
39
- output_dict = {
40
  "predicted_label": predicted_label,
41
  "evaluation": predicted_probability,
42
  "summary": summary
43
  }
44
-
45
- with open('output.json', 'w') as json_file:
46
- json.dump(output_dict, json_file)
47
 
48
  return output_dict
49
 
 
36
  predicted_probability = result[0]['score']
37
  summary = summarizer(extracted_text, max_length=1000, min_length=30, do_sample=False)[0]['summary_text']
38
 
39
+ output = {
40
  "predicted_label": predicted_label,
41
  "evaluation": predicted_probability,
42
  "summary": summary
43
  }
44
+
45
+ output_dict = json.dumps(output, indent = 3)
 
46
 
47
  return output_dict
48