Spaces:
Runtime error
Runtime error
ashwinaravind
commited on
Commit
•
b01c38e
1
Parent(s):
b5d1b9b
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def generate_context(text):
|
|
20 |
input=[text],
|
21 |
model=embed_model
|
22 |
).data[0].embedding
|
23 |
-
result = index.query(vector=res, top_k=
|
24 |
contexts = []
|
25 |
contexts = contexts + [x['metadata']['text'] for x in result['matches']]
|
26 |
return contexts
|
|
|
20 |
input=[text],
|
21 |
model=embed_model
|
22 |
).data[0].embedding
|
23 |
+
result = index.query(vector=res, top_k=20, include_metadata=True)
|
24 |
contexts = []
|
25 |
contexts = contexts + [x['metadata']['text'] for x in result['matches']]
|
26 |
return contexts
|