Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def text_to_sentences(text):
|
|
26 |
return re.split(r'(?<=[^A-Z].[.?]) +(?=[A-Z])', clean_text)
|
27 |
|
28 |
# function to concatenate sentences into chunks of size 900 or less
|
29 |
-
def chunks_of_900(text, chunk_size=900):
|
30 |
sentences = text_to_sentences(text)
|
31 |
chunks = []
|
32 |
current_chunk = ""
|
|
|
26 |
return re.split(r'(?<=[^A-Z].[.?]) +(?=[A-Z])', clean_text)
|
27 |
|
28 |
# function to concatenate sentences into chunks of size 900 or less
|
29 |
+
def chunks_of_900(text, chunk_size = 900):
|
30 |
sentences = text_to_sentences(text)
|
31 |
chunks = []
|
32 |
current_chunk = ""
|