Spaces:
Runtime error
Runtime error
Commit
·
90fd7fd
1
Parent(s):
6e9dcd9
working on text splitting
Browse files
app.py
CHANGED
|
@@ -95,8 +95,8 @@ 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),
|
| 99 |
-
split_token_length=
|
| 100 |
)
|
| 101 |
for sentence in sentences:
|
| 102 |
output = pipe(sentence)
|
|
|
|
| 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, language="english"),
|
| 99 |
+
split_token_length=900
|
| 100 |
)
|
| 101 |
for sentence in sentences:
|
| 102 |
output = pipe(sentence)
|