Spaces:
Runtime error
Runtime error
Abhilashvj
commited on
Commit
•
641a396
1
Parent(s):
9f43bd1
Update app.py
Browse files
app.py
CHANGED
@@ -54,7 +54,9 @@ docx_converter = DocxToTextConverter()
|
|
54 |
|
55 |
# check if the abstractive-question-answering index exists
|
56 |
if index_name not in pinecone.list_indexes():
|
57 |
-
# create the index if it does not exist
|
|
|
|
|
58 |
pinecone.create_index(index_name, dimension=1536, metric="cosine")
|
59 |
|
60 |
# connect to abstractive-question-answering index we created
|
|
|
54 |
|
55 |
# check if the abstractive-question-answering index exists
|
56 |
if index_name not in pinecone.list_indexes():
|
57 |
+
# delete the current index and create the new index if it does not exist
|
58 |
+
for delete_index in pinecone.list_indexes():
|
59 |
+
pinecone.delete_index(delete_index)
|
60 |
pinecone.create_index(index_name, dimension=1536, metric="cosine")
|
61 |
|
62 |
# connect to abstractive-question-answering index we created
|