nickmuchi commited on
Commit
b0f397c
1 Parent(s): b14f109

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -442,9 +442,9 @@ summarize = st.button("Summarize")
442
  if summarize:
443
  if model_type == "Facebook-Bart":
444
  if url_text:
445
- text_to_summarize =cleaned_text
446
  else:
447
- text_to_summarize = cleaned_text
448
 
449
  with st.spinner(
450
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
@@ -455,9 +455,9 @@ if summarize:
455
 
456
  elif model_type == "Sshleifer-DistilBart":
457
  if url_text:
458
- text_to_summarize = cleaned_text
459
  else:
460
- text_to_summarize = cleaned_text
461
 
462
  with st.spinner(
463
  text="Loading Sshleifer-DistilBart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
 
442
  if summarize:
443
  if model_type == "Facebook-Bart":
444
  if url_text:
445
+ text_to_summarize =cleaned_text[0]
446
  else:
447
+ text_to_summarize = cleaned_text[0]
448
 
449
  with st.spinner(
450
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
 
455
 
456
  elif model_type == "Sshleifer-DistilBart":
457
  if url_text:
458
+ text_to_summarize = cleaned_text[0]
459
  else:
460
+ text_to_summarize = cleaned_text[0]
461
 
462
  with st.spinner(
463
  text="Loading Sshleifer-DistilBart Model and Extracting summary. This might take a few seconds depending on the length of your text..."