Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,11 +74,9 @@ if uploaded_file is not None:
|
|
| 74 |
paragraphs = extract_paragraphs_by_vertical_spacing(pdf_data)
|
| 75 |
i = 1
|
| 76 |
for paragraph in paragraphs:
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
st.
|
| 80 |
-
summary = summarizer(paragraph, max_length=(len(paragraph) * 1/2), min_length=30, do_sample=False)
|
| 81 |
-
st.text(f"Paragraphe {i}: {summary[0]['summary_text']}") # Affiche le résumé du paragraphe
|
| 82 |
i = i + 1
|
| 83 |
image_bytes = query({
|
| 84 |
"inputs": summary[0]['summary_text'], # Utilisez le texte du résumé
|
|
|
|
| 74 |
paragraphs = extract_paragraphs_by_vertical_spacing(pdf_data)
|
| 75 |
i = 1
|
| 76 |
for paragraph in paragraphs:
|
| 77 |
+
|
| 78 |
+
summary = summarizer(paragraph, max_length=(len(paragraph)/2), min_length=10, do_sample=False)
|
| 79 |
+
st.text(f"Paragraphe {i}: {summary}") # Affiche le résumé du paragraphe
|
|
|
|
|
|
|
| 80 |
i = i + 1
|
| 81 |
image_bytes = query({
|
| 82 |
"inputs": summary[0]['summary_text'], # Utilisez le texte du résumé
|