Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ class PDFChatbot:
|
|
47 |
current_chunk = []
|
48 |
current_length = 0
|
49 |
for word in words:
|
50 |
-
if current_length + len(word) + 1 >
|
51 |
if current_chunk:
|
52 |
chunks.append(" ".join(current_chunk))
|
53 |
current_chunk = [word]
|
|
|
47 |
current_chunk = []
|
48 |
current_length = 0
|
49 |
for word in words:
|
50 |
+
if current_length + len(word) + 1 > 3000:
|
51 |
if current_chunk:
|
52 |
chunks.append(" ".join(current_chunk))
|
53 |
current_chunk = [word]
|