Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -46,14 +46,14 @@ def custom_split_text(text: str) -> list:
|
|
46 |
"""
|
47 |
words = text.split()
|
48 |
chunks = []
|
49 |
-
chunk_size =
|
50 |
start = 0
|
51 |
while start < len(words):
|
52 |
end = start + chunk_size
|
53 |
chunk = " ".join(words[start:end])
|
54 |
chunks.append(chunk)
|
55 |
start = end
|
56 |
-
chunk_size
|
57 |
return chunks
|
58 |
|
59 |
|
|
|
46 |
"""
|
47 |
words = text.split()
|
48 |
chunks = []
|
49 |
+
chunk_size = 2
|
50 |
start = 0
|
51 |
while start < len(words):
|
52 |
end = start + chunk_size
|
53 |
chunk = " ".join(words[start:end])
|
54 |
chunks.append(chunk)
|
55 |
start = end
|
56 |
+
chunk_size += 2
|
57 |
return chunks
|
58 |
|
59 |
|