Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -17,15 +17,15 @@ index_name = "whatsapp-chat-index"
|
|
17 |
|
18 |
if 'index_name' not in pc.list_indexes().names():
|
19 |
pc.create_index(
|
20 |
-
name=index_name,
|
21 |
-
dimension=
|
22 |
-
metric=
|
23 |
spec=ServerlessSpec(
|
24 |
cloud='aws',
|
25 |
-
region='us-
|
26 |
)
|
27 |
)
|
28 |
-
|
29 |
index = pinecone.Index(index_name)
|
30 |
|
31 |
# Initialize Hugging Face embeddings
|
|
|
17 |
|
18 |
if 'index_name' not in pc.list_indexes().names():
|
19 |
pc.create_index(
|
20 |
+
name=index_name,
|
21 |
+
dimension=384, # change as per embedding model
|
22 |
+
metric="cosine",
|
23 |
spec=ServerlessSpec(
|
24 |
cloud='aws',
|
25 |
+
region='us-east-1'
|
26 |
)
|
27 |
)
|
28 |
+
|
29 |
index = pinecone.Index(index_name)
|
30 |
|
31 |
# Initialize Hugging Face embeddings
|