newoz commited on
Commit
3ebaf3b
·
1 Parent(s): 0771edb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -37,11 +37,4 @@ if uploaded_file is not None:
37
  st.subheader("Longs paragraphes du PDF avec résumé:")
38
  for i, paragraphe in enumerate(longs_paragraphes, start=1):
39
  summary = summarizer(paragraphe, max_length=900, min_length=200, do_sample=False)
40
- if isinstance(summary, list) and len(summary) > 0:
41
- summary_text = summary[0].get("summary_text")
42
- if summary_text:
43
- st.text(f"Paragraphe {i}: {summary_text}")
44
- else:
45
- st.text(f"Paragraphe {i}: Résumé indisponible")
46
- else:
47
- st.text(f"Paragraphe {i}: Résumé indisponible")
 
37
  st.subheader("Longs paragraphes du PDF avec résumé:")
38
  for i, paragraphe in enumerate(longs_paragraphes, start=1):
39
  summary = summarizer(paragraphe, max_length=900, min_length=200, do_sample=False)
40
+ st.text(f"Paragraphe {i}: {summary_text}")