tommasobaldi commited on
Commit
d09a554
1 Parent(s): 9dec26b

working on text splitting

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -36,8 +36,8 @@ def main() -> None:
36
 
37
  def display_summary(summary_sentences: list) -> None:
38
  st.subheader("Summary :male-detective:")
39
- for senetence in summary_sentences:
40
- st.markdown(f"<li>{senetence}</li>", unsafe_allow_html=True)
41
 
42
  def get_list_files() -> list:
43
  names = []
@@ -125,7 +125,8 @@ def main() -> None:
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
- display_summary(pipe(sentence))
 
129
  #output = pipe(sentence)
130
  #st.markdown(output["summary_text"])
131
 
 
36
 
37
  def display_summary(summary_sentences: list) -> None:
38
  st.subheader("Summary :male-detective:")
39
+ for sentence in summary_sentences:
40
+ st.markdown(f"<li>{sentence['summary_text']}</li>", unsafe_allow_html=True)
41
 
42
  def get_list_files() -> list:
43
  names = []
 
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