yannESGI commited on
Commit
987aa3f
·
1 Parent(s): 5f2f34a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -92,8 +92,8 @@ if uploaded_file is not None:
92
 
93
  for paragraph in paragraphs:
94
 
95
- summary = summarizer(paragraph, max_length=(round(len(paragraph) / 2)), min_length=10, do_sample=False)
96
- if summary and summary[0].get('summary_text'):
97
  summary_text = add_line_breaks_to_summary(summary[0]['summary_text'], 80)
98
 
99
 
 
92
 
93
  for paragraph in paragraphs:
94
 
95
+ summary = summarizer(paragraph, max_length=(round(len(paragraph) / 3)), min_length=10, do_sample=False)
96
+ if summary and len(summary) > 0 and 'summary_text' in summary[0]:
97
  summary_text = add_line_breaks_to_summary(summary[0]['summary_text'], 80)
98
 
99