Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -76,10 +76,10 @@ if uploaded_file is not None:
|
|
| 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[0]}") # Affiche le résumé du paragraphe
|
| 80 |
|
| 81 |
image_bytes = query({
|
| 82 |
-
"inputs": summary[0] # Utilisez le texte du résumé
|
| 83 |
})
|
| 84 |
image = Image.open(io.BytesIO(image_bytes))
|
| 85 |
st.image(image)
|
|
|
|
| 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[0]['summary_text']}") # Affiche le résumé du paragraphe
|
| 80 |
|
| 81 |
image_bytes = query({
|
| 82 |
+
"inputs": summary[0]['summary_text'] # Utilisez le texte du résumé
|
| 83 |
})
|
| 84 |
image = Image.open(io.BytesIO(image_bytes))
|
| 85 |
st.image(image)
|