Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,7 +37,7 @@ if uploaded_file is not None:
|
|
| 37 |
st.subheader("Longs paragraphes du PDF avec résumé:")
|
| 38 |
for i, paragraphe in enumerate(longs_paragraphes, start=1):
|
| 39 |
summary = summarizer(paragraphe, max_length=600, min_length=30, do_sample=False)
|
| 40 |
-
if isinstance(summary, list) and summary:
|
| 41 |
summary_text = summary[0].get("summary_text")
|
| 42 |
if summary_text:
|
| 43 |
st.text(f"Paragraphe {i}: {summary_text}")
|
|
|
|
| 37 |
st.subheader("Longs paragraphes du PDF avec résumé:")
|
| 38 |
for i, paragraphe in enumerate(longs_paragraphes, start=1):
|
| 39 |
summary = summarizer(paragraphe, max_length=600, min_length=30, do_sample=False)
|
| 40 |
+
if isinstance(summary, list) and len(summary) > 0:
|
| 41 |
summary_text = summary[0].get("summary_text")
|
| 42 |
if summary_text:
|
| 43 |
st.text(f"Paragraphe {i}: {summary_text}")
|