Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ def MOP(path):
|
|
| 23 |
docs=[]
|
| 24 |
loader = PyPDFDirectoryLoader(path)
|
| 25 |
docs = loader.load()
|
| 26 |
-
text_splitter = RecursiveCharacterTextSplitter(chunk_size=
|
| 27 |
text_chunks = text_splitter.split_documents(docs)
|
| 28 |
embeddings = HuggingFaceEmbeddings(model_name="thenlper/gte-base")
|
| 29 |
vector_store = FAISS.from_documents(text_chunks, embedding=embeddings)
|
|
|
|
| 23 |
docs=[]
|
| 24 |
loader = PyPDFDirectoryLoader(path)
|
| 25 |
docs = loader.load()
|
| 26 |
+
text_splitter = RecursiveCharacterTextSplitter(chunk_size=1000 , chunk_overlap=500)
|
| 27 |
text_chunks = text_splitter.split_documents(docs)
|
| 28 |
embeddings = HuggingFaceEmbeddings(model_name="thenlper/gte-base")
|
| 29 |
vector_store = FAISS.from_documents(text_chunks, embedding=embeddings)
|