Spaces:
Runtime error
Runtime error
Commit
·
1ba1fd2
1
Parent(s):
d09a554
working on text splitting
Browse files
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
|
129 |
-
|
|
|
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 |
|