Spaces:
Sleeping
Sleeping
Commit
·
c5e28fd
1
Parent(s):
1b14b9b
Minor fix
Browse files
app.py
CHANGED
@@ -39,7 +39,7 @@ def store_embeddings(pdf_path, chunk_size, chunk_overlap):
|
|
39 |
|
40 |
index = pc.Index(host="https://langchain-test-index-la2n80y.svc.aped-4627-b74a.pinecone.io")
|
41 |
|
42 |
-
if index.
|
43 |
index.delete(delete_all=True)
|
44 |
|
45 |
chroma_db = Chroma.from_documents(documents, embeddings, persist_directory="./chroma_db")
|
|
|
39 |
|
40 |
index = pc.Index(host="https://langchain-test-index-la2n80y.svc.aped-4627-b74a.pinecone.io")
|
41 |
|
42 |
+
if index.describe_index_stats()['total_vector_count'] > 0:
|
43 |
index.delete(delete_all=True)
|
44 |
|
45 |
chroma_db = Chroma.from_documents(documents, embeddings, persist_directory="./chroma_db")
|