Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -21,7 +21,7 @@ pc = Pinecone(api_key=os.environ['PINECONE_API_KEY'])
|
|
21 |
index_name = "italy-kg"
|
22 |
|
23 |
# Create index if it doesn't exist
|
24 |
-
if index_name not in
|
25 |
pc.create_index(
|
26 |
name=index_name,
|
27 |
dimension=1536,
|
|
|
21 |
index_name = "italy-kg"
|
22 |
|
23 |
# Create index if it doesn't exist
|
24 |
+
if index_name not in pc.list_indexes():
|
25 |
pc.create_index(
|
26 |
name=index_name,
|
27 |
dimension=1536,
|