Ahmed235 commited on
Commit
985d946
·
verified ·
1 Parent(s): 124a463

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
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
- output_dict = {
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