Spaces:
Sleeping
Sleeping
Flavio Casadei Della Chiesa
commited on
Commit
·
eb935f8
1
Parent(s):
12b57fb
prima bozza di riassunti
Browse files
HFBot.py
CHANGED
|
@@ -49,6 +49,7 @@ class HFBot():
|
|
| 49 |
|
| 50 |
def riassumi(self, text):
|
| 51 |
retval =""
|
|
|
|
| 52 |
pipe = pipeline("summarization", model=self.model_name)
|
| 53 |
retval = pipe(text)
|
| 54 |
return retval
|
|
|
|
| 49 |
|
| 50 |
def riassumi(self, text):
|
| 51 |
retval =""
|
| 52 |
+
|
| 53 |
pipe = pipeline("summarization", model=self.model_name)
|
| 54 |
retval = pipe(text)
|
| 55 |
return retval
|
app.py
CHANGED
|
@@ -53,7 +53,7 @@ def main():
|
|
| 53 |
f.write(main_pdf.read())
|
| 54 |
st.success(f"✅ Determinazione caricata con successo! File salvato in: `{save_path}`")
|
| 55 |
testi= docprocessor.estrai_da_pdf(save_path)
|
| 56 |
-
st.write(testi[:
|
| 57 |
#ßragpipeline.aggiungi_file_pdf(save_path)
|
| 58 |
st.session_state["indice_creato"] = True
|
| 59 |
except Exception as e:
|
|
|
|
| 53 |
f.write(main_pdf.read())
|
| 54 |
st.success(f"✅ Determinazione caricata con successo! File salvato in: `{save_path}`")
|
| 55 |
testi= docprocessor.estrai_da_pdf(save_path)
|
| 56 |
+
st.write(testi[:400])
|
| 57 |
#ßragpipeline.aggiungi_file_pdf(save_path)
|
| 58 |
st.session_state["indice_creato"] = True
|
| 59 |
except Exception as e:
|