Increase max length to 400
Browse files- handler.py +1 -1
handler.py
CHANGED
@@ -34,7 +34,7 @@ def convert_numbers_to_text(input_string):
|
|
34 |
|
35 |
return ' '.join(new_words)
|
36 |
|
37 |
-
def split_and_recombine_text(text, desired_length=200, max_length=
|
38 |
"""Split text it into chunks of a desired length trying to keep sentences intact."""
|
39 |
# normalize text, remove redundant whitespace and convert non-ascii quotes to ascii
|
40 |
text = re.sub(r'\n\n+', '\n', text)
|
|
|
34 |
|
35 |
return ' '.join(new_words)
|
36 |
|
37 |
+
def split_and_recombine_text(text, desired_length=200, max_length=400):
|
38 |
"""Split text it into chunks of a desired length trying to keep sentences intact."""
|
39 |
# normalize text, remove redundant whitespace and convert non-ascii quotes to ascii
|
40 |
text = re.sub(r'\n\n+', '\n', text)
|