Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -82,7 +82,7 @@ def load_vector_store(file_path, store_name, force_reload=False):
|
|
82 |
#st.text(f"Loaded existing vector store from {vector_store_path}")
|
83 |
else:
|
84 |
# Load and process the PDF, then create the vector store
|
85 |
-
text_splitter = RecursiveCharacterTextSplitter(chunk_size=
|
86 |
text = load_pdf_text(file_path)
|
87 |
chunks = text_splitter.split_text(text=text)
|
88 |
embeddings = OpenAIEmbeddings()
|
|
|
82 |
#st.text(f"Loaded existing vector store from {vector_store_path}")
|
83 |
else:
|
84 |
# Load and process the PDF, then create the vector store
|
85 |
+
text_splitter = RecursiveCharacterTextSplitter(chunk_size=800, chunk_overlap=200, length_function=len)
|
86 |
text = load_pdf_text(file_path)
|
87 |
chunks = text_splitter.split_text(text=text)
|
88 |
embeddings = OpenAIEmbeddings()
|