Update app.py
Browse files
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 |
-
|
| 40 |
"predicted_label": predicted_label,
|
| 41 |
"evaluation": predicted_probability,
|
| 42 |
"summary": summary
|
| 43 |
}
|
| 44 |
-
|
| 45 |
-
|
| 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 |
|