tommasobaldi commited on
Commit
6e9dcd9
1 Parent(s): 5d8fa8c

working on text splitting

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -95,7 +95,9 @@ def main() -> None:
95
  if target_text_input is not "":
96
  summary_sentences = []
97
  with st.spinner("Summarizing in progress..."):
98
- sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input), 600)
 
 
99
  for sentence in sentences:
100
  output = pipe(sentence)
101
  summary = output[0]["summary_text"]
 
95
  if target_text_input is not "":
96
  summary_sentences = []
97
  with st.spinner("Summarizing in progress..."):
98
+ sentences = split_sentences_by_token_length(nltk.sent_tokenize(target_text_input),
99
+ split_token_length=400
100
+ )
101
  for sentence in sentences:
102
  output = pipe(sentence)
103
  summary = output[0]["summary_text"]