Spaces:
Runtime error
Runtime error
Commit
·
530ce31
1
Parent(s):
9c2c31c
working on text splitting
Browse files
app.py
CHANGED
@@ -104,7 +104,7 @@ def main() -> None:
|
|
104 |
result = []
|
105 |
for sentence in sentences:
|
106 |
tokens = word_tokenize(sentence)
|
107 |
-
if token_count + len(tokens) <
|
108 |
token_count += len(tokens)
|
109 |
text_block += " ".join(sentence)
|
110 |
else:
|
|
|
104 |
result = []
|
105 |
for sentence in sentences:
|
106 |
tokens = word_tokenize(sentence)
|
107 |
+
if token_count + len(tokens) < 500:
|
108 |
token_count += len(tokens)
|
109 |
text_block += " ".join(sentence)
|
110 |
else:
|