Spaces:
Runtime error
Runtime error
Updated to newindex with pinecone in aws
Browse files
app.py
CHANGED
|
@@ -62,7 +62,7 @@ def connect_pinecone():
|
|
| 62 |
return pinecone
|
| 63 |
|
| 64 |
def get_pinecone_semantic_index(pinecone):
|
| 65 |
-
index_name = "sematic-search"
|
| 66 |
|
| 67 |
# only create if it deosnot exists
|
| 68 |
if index_name not in pinecone.list_indexes().names():
|
|
@@ -71,7 +71,7 @@ def get_pinecone_semantic_index(pinecone):
|
|
| 71 |
description="Semantic search",
|
| 72 |
dimension=model.get_sentence_embedding_dimension(),
|
| 73 |
metric="cosine",
|
| 74 |
-
spec=ServerlessSpec( cloud='
|
| 75 |
)
|
| 76 |
# now connect to index
|
| 77 |
index = pinecone.Index(index_name)
|
|
|
|
| 62 |
return pinecone
|
| 63 |
|
| 64 |
def get_pinecone_semantic_index(pinecone):
|
| 65 |
+
index_name = "sematic-search-index"
|
| 66 |
|
| 67 |
# only create if it deosnot exists
|
| 68 |
if index_name not in pinecone.list_indexes().names():
|
|
|
|
| 71 |
description="Semantic search",
|
| 72 |
dimension=model.get_sentence_embedding_dimension(),
|
| 73 |
metric="cosine",
|
| 74 |
+
spec=ServerlessSpec( cloud='aws', region='us-east-1' )
|
| 75 |
)
|
| 76 |
# now connect to index
|
| 77 |
index = pinecone.Index(index_name)
|