Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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) /
|
| 96 |
-
if summary and summary
|
| 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 |
|