Spaces:
Runtime error
Runtime error
Commit
·
42780ef
1
Parent(s):
b9f5a52
working on text splitting
Browse files
app.py
CHANGED
@@ -97,15 +97,15 @@ def main() -> None:
|
|
97 |
split_token_length=1024
|
98 |
)
|
99 |
for sentence in sentences:
|
100 |
-
token_list = [token for token in nltk.word_tokenize(sentence)]
|
101 |
-
st.markdown(sentence)
|
102 |
-
st.markdown(str(len(token_list)))
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
|
110 |
|
111 |
if __name__ == "__main__":
|
|
|
97 |
split_token_length=1024
|
98 |
)
|
99 |
for sentence in sentences:
|
100 |
+
# token_list = [token for token in nltk.word_tokenize(sentence)]
|
101 |
+
# st.markdown(sentence)
|
102 |
+
# st.markdown(str(len(token_list)))
|
103 |
+
output = pipe(sentence)
|
104 |
+
summary = output[0]["summary_text"]
|
105 |
+
for line in summary.split("."):
|
106 |
+
if line != "":
|
107 |
+
summary_sentences.append(line)
|
108 |
+
display_summary(summary_sentences)
|
109 |
|
110 |
|
111 |
if __name__ == "__main__":
|