Update app.py
Browse files
app.py
CHANGED
@@ -35,12 +35,11 @@ def predict_pptx_content(file_path):
|
|
35 |
predicted_probability = result[0]['score']
|
36 |
summary = summarizer(extracted_text, max_length=1000, min_length=30, do_sample=False)[0]['summary_text']
|
37 |
|
38 |
-
|
39 |
"predicted_label": predicted_label,
|
40 |
"evaluation": predicted_probability,
|
41 |
"summary": summary
|
42 |
}
|
43 |
-
return str(output_dict) # Convert dictionary to string for output
|
44 |
|
45 |
except Exception as e:
|
46 |
# Log the error details
|
|
|
35 |
predicted_probability = result[0]['score']
|
36 |
summary = summarizer(extracted_text, max_length=1000, min_length=30, do_sample=False)[0]['summary_text']
|
37 |
|
38 |
+
return {
|
39 |
"predicted_label": predicted_label,
|
40 |
"evaluation": predicted_probability,
|
41 |
"summary": summary
|
42 |
}
|
|
|
43 |
|
44 |
except Exception as e:
|
45 |
# Log the error details
|