Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -109,7 +109,7 @@ def get_pinecone_index(database_id: str) -> Index:
|
|
109 |
pc = Pinecone(api_key=os.getenv('PINECONE_API_KEY'))
|
110 |
|
111 |
# if the index does not exist, we create it
|
112 |
-
if not database_id in
|
113 |
pc.create_index(
|
114 |
database_id,
|
115 |
dimension=shape[1],
|
|
|
109 |
pc = Pinecone(api_key=os.getenv('PINECONE_API_KEY'))
|
110 |
|
111 |
# if the index does not exist, we create it
|
112 |
+
if not database_id in pc.list_indexes():
|
113 |
pc.create_index(
|
114 |
database_id,
|
115 |
dimension=shape[1],
|