Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -111,7 +111,7 @@ def loadAndSplitPdfFile(filePath):
|
|
111 |
|
112 |
def prepare_retriever(filePath = "", load_from_chromadb = False):
|
113 |
if load_from_chromadb:
|
114 |
-
vector_store = Chroma(persist_directory=persist_directory,
|
115 |
return vector_store.as_retriever(search_kwargs={"k": 5})
|
116 |
elif filePath:
|
117 |
doc_chunks = loadAndSplitPdfFile(filePath)
|
|
|
111 |
|
112 |
def prepare_retriever(filePath = "", load_from_chromadb = False):
|
113 |
if load_from_chromadb:
|
114 |
+
vector_store = Chroma(persist_directory=persist_directory, embedding_function = embeddings)
|
115 |
return vector_store.as_retriever(search_kwargs={"k": 5})
|
116 |
elif filePath:
|
117 |
doc_chunks = loadAndSplitPdfFile(filePath)
|