Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
| 1 |
from PyPDF2 import PdfReader
|
| 2 |
import re
|
|
|
|
| 3 |
import streamlit as st
|
| 4 |
import fitz
|
| 5 |
from transformers import pipeline
|
|
@@ -75,9 +76,10 @@ if uploaded_file is not None:
|
|
| 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
|
| 79 |
})
|
| 80 |
image = Image.open(io.BytesIO(image_bytes))
|
| 81 |
st.image(image)
|
| 82 |
|
| 83 |
-
i = i + 1
|
|
|
|
|
|
| 1 |
from PyPDF2 import PdfReader
|
| 2 |
import re
|
| 3 |
+
import python-pptx
|
| 4 |
import streamlit as st
|
| 5 |
import fitz
|
| 6 |
from transformers import pipeline
|
|
|
|
| 76 |
st.text(f"Paragraphe {i}: {summary[0]['summary_text']}") # Affiche le résumé du paragraphe
|
| 77 |
|
| 78 |
image_bytes = query({
|
| 79 |
+
"inputs": 'A picture about :' + summary[0]['summary_text'] # Utilisez le texte du résumé
|
| 80 |
})
|
| 81 |
image = Image.open(io.BytesIO(image_bytes))
|
| 82 |
st.image(image)
|
| 83 |
|
| 84 |
+
i = i + 1
|
| 85 |
+
|