jamescalam commited on
Commit
4918b4b
1 Parent(s): 23aa474

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -67,9 +67,9 @@ def prompt_query(text: str):
67
  print(f"Error during query: {e}")
68
  # reinitialize connection
69
  pinecone.init(api_key=PINECONE_KEY, environment='us-west1-gcp')
70
- index = pinecone.Index(index_id)
71
  try:
72
- xc = index.query(embeds, top_k=30, include_metadata=True)
73
  except Exception as e:
74
  raise ValueError(e)
75
  prompts = [
@@ -131,9 +131,9 @@ def prompt_image(text: str):
131
  print(f"Error during query: {e}")
132
  # reinitialize connection
133
  pinecone.init(api_key=PINECONE_KEY, environment='us-west1-gcp')
134
- index = pinecone.Index(index_id)
135
  try:
136
- xc = index.query(embeds, top_k=9, include_metadata=True)
137
  except Exception as e:
138
  raise ValueError(e)
139
  image_urls = [
 
67
  print(f"Error during query: {e}")
68
  # reinitialize connection
69
  pinecone.init(api_key=PINECONE_KEY, environment='us-west1-gcp')
70
+ index2 = pinecone.Index(index_id)
71
  try:
72
+ xc = index2.query(embeds, top_k=30, include_metadata=True)
73
  except Exception as e:
74
  raise ValueError(e)
75
  prompts = [
 
131
  print(f"Error during query: {e}")
132
  # reinitialize connection
133
  pinecone.init(api_key=PINECONE_KEY, environment='us-west1-gcp')
134
+ index2 = pinecone.Index(index_id)
135
  try:
136
+ xc = index2.query(embeds, top_k=9, include_metadata=True)
137
  except Exception as e:
138
  raise ValueError(e)
139
  image_urls = [