Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -67,6 +67,8 @@ def load_vector_store(file_path, store_name, force_reload=False):
|
|
67 |
|
68 |
embeddings = OpenAIEmbeddings()
|
69 |
VectorStore = FAISS.from_texts(chunks, embedding=embeddings)
|
|
|
|
|
70 |
with open(f"{store_name}.pkl", "wb") as f:
|
71 |
pickle.dump(VectorStore, f)
|
72 |
else:
|
|
|
67 |
|
68 |
embeddings = OpenAIEmbeddings()
|
69 |
VectorStore = FAISS.from_texts(chunks, embedding=embeddings)
|
70 |
+
VectorStore.save_local("faiss_store")
|
71 |
+
FAISS.load_local("faiss_store", OpenAIEmbeddings())
|
72 |
with open(f"{store_name}.pkl", "wb") as f:
|
73 |
pickle.dump(VectorStore, f)
|
74 |
else:
|