Spaces:
Sleeping
Sleeping
Commit
·
cc7e366
1
Parent(s):
110526b
Minor fix
Browse files
app.py
CHANGED
@@ -36,7 +36,8 @@ def inference(pdf_path, chunk_size, chunk_overlap):
|
|
36 |
|
37 |
index = pc.Index(host="https://langchain-test-index-la2n80y.svc.aped-4627-b74a.pinecone.io")
|
38 |
|
39 |
-
index.
|
|
|
40 |
|
41 |
chroma_db = Chroma.from_documents(documents, embeddings, persist_directory="./chroma_db")
|
42 |
faiss_db = FAISS.from_documents(documents, embeddings)
|
|
|
36 |
|
37 |
index = pc.Index(host="https://langchain-test-index-la2n80y.svc.aped-4627-b74a.pinecone.io")
|
38 |
|
39 |
+
if index.list():
|
40 |
+
index.delete(delete_all=True)
|
41 |
|
42 |
chroma_db = Chroma.from_documents(documents, embeddings, persist_directory="./chroma_db")
|
43 |
faiss_db = FAISS.from_documents(documents, embeddings)
|