Update app.py
Browse files
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..."
|