Spaces:
Runtime error
Runtime error
jamescalam
commited on
Commit
•
4918b4b
1
Parent(s):
23aa474
Update app.py
Browse files
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 |
-
|
71 |
try:
|
72 |
-
xc =
|
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 |
-
|
135 |
try:
|
136 |
-
xc =
|
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 = [
|