Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -158,7 +158,7 @@ def process_pdf(pdf_file, uploaded_documents):
|
|
158 |
all_text += page.extract_text()
|
159 |
|
160 |
# Split the text into chunks
|
161 |
-
text_splitter = RecursiveCharacterTextSplitter(chunk_size=
|
162 |
chunks = text_splitter.split_text(all_text)
|
163 |
|
164 |
# Embed and upload the chunks into the vector database
|
|
|
158 |
all_text += page.extract_text()
|
159 |
|
160 |
# Split the text into chunks
|
161 |
+
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000, chunk_overlap=0)
|
162 |
chunks = text_splitter.split_text(all_text)
|
163 |
|
164 |
# Embed and upload the chunks into the vector database
|