newoz commited on
Commit
56d13f4
·
1 Parent(s): 16b6e7e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -37,7 +37,7 @@ 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=600, min_length=30, do_sample=False)
40
- if isinstance(summary, list) and summary:
41
  summary_text = summary[0].get("summary_text")
42
  if summary_text:
43
  st.text(f"Paragraphe {i}: {summary_text}")
 
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=600, min_length=30, 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}")