tommasobaldi commited on
Commit
1ba1fd2
·
1 Parent(s): d09a554

working on text splitting

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -122,11 +122,13 @@ def main() -> None:
122
 
123
  if summarize_button:
124
  if target_text_input is not "":
 
125
  with st.spinner("Summarizing in progress..."):
126
  sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input), 600)
127
  for sentence in sentences:
128
- summary_sentences = pipe(sentence)
129
- display_summary(summary_sentences["summary_text"].split("."))
 
130
  #output = pipe(sentence)
131
  #st.markdown(output["summary_text"])
132
 
 
122
 
123
  if summarize_button:
124
  if target_text_input is not "":
125
+ summary_sentences = ""
126
  with st.spinner("Summarizing in progress..."):
127
  sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input), 600)
128
  for sentence in sentences:
129
+ summary_sentences += "".join(pipe(sentence)["summary_text"])
130
+
131
+ display_summary(summary_sentences.split("."))
132
  #output = pipe(sentence)
133
  #st.markdown(output["summary_text"])
134