pratikshahp commited on
Commit
3f6356f
·
verified ·
1 Parent(s): 18f84bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
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=1536,
22
- metric='euclidean',
23
  spec=ServerlessSpec(
24
  cloud='aws',
25
- region='us-west-2'
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