Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,10 +60,6 @@ def extract_paragraphs_by_vertical_spacing(pdf_data, spacing_threshold=10):
|
|
| 60 |
|
| 61 |
return paragraphs
|
| 62 |
|
| 63 |
-
#def extract_paragraph(texte):
|
| 64 |
-
# paragraph = texte.split("\n\n")
|
| 65 |
-
# return paragraph
|
| 66 |
-
|
| 67 |
st.title("PDF2SLIDE")
|
| 68 |
|
| 69 |
uploaded_file = st.file_uploader("Selectionnez un PDF", type=["pdf"])
|
|
@@ -79,7 +75,7 @@ if uploaded_file is not None:
|
|
| 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)
|
|
|
|
| 60 |
|
| 61 |
return paragraphs
|
| 62 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 63 |
st.title("PDF2SLIDE")
|
| 64 |
|
| 65 |
uploaded_file = st.file_uploader("Selectionnez un PDF", type=["pdf"])
|
|
|
|
| 75 |
st.text(f"Paragraphe {i}: {summary[0]['summary_text']}") # Affiche le résumé du paragraphe
|
| 76 |
|
| 77 |
image_bytes = query({
|
| 78 |
+
"inputs": 'A picture about :' + summary[0]['summary_text'] # Utilisez le texte du résumé
|
| 79 |
})
|
| 80 |
image = Image.open(io.BytesIO(image_bytes))
|
| 81 |
st.image(image)
|