nickmuchi commited on
Commit
d02c6bd
·
1 Parent(s): b4441a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -210,22 +210,20 @@ if summarize:
210
  text_to_summarize = chunks
211
  else:
212
  text_to_summarize = clean_text
213
- # extractive summarizer
214
-
215
  with st.spinner(
216
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
217
  ):
218
  summarizer_model = facebook_model()
219
  summarized_text = summarizer_model(text_to_summarize, max_length=100, min_length=30)
220
  summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
221
-
222
- elif model_type == "Sshleifer-DistilBart":
223
  if is_url:
224
  text_to_summarize = chunks
225
  else:
226
  text_to_summarize = clean_text
227
- # extractive summarizer
228
-
229
  with st.spinner(
230
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
231
  ):
 
210
  text_to_summarize = chunks
211
  else:
212
  text_to_summarize = clean_text
213
+
 
214
  with st.spinner(
215
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
216
  ):
217
  summarizer_model = facebook_model()
218
  summarized_text = summarizer_model(text_to_summarize, max_length=100, min_length=30)
219
  summarized_text = ' '.join([summ['summary_text'] for summ in summarized_text])
220
+
221
+ elif model_type == "Sshleifer-DistilBart":
222
  if is_url:
223
  text_to_summarize = chunks
224
  else:
225
  text_to_summarize = clean_text
226
+
 
227
  with st.spinner(
228
  text="Loading Facebook-Bart Model and Extracting summary. This might take a few seconds depending on the length of your text..."
229
  ):