Spaces:
Sleeping
Sleeping
Commit
·
4cf275b
1
Parent(s):
480902c
Update run.py
Browse files
run.py
CHANGED
@@ -93,7 +93,7 @@ def response(message, history):
|
|
93 |
#where={"source": "google-docs"}
|
94 |
#where_document={"$contains":"search_string"}
|
95 |
)
|
96 |
-
dists=["<small>(relevance: "+str(round(1-d)*100
|
97 |
sources=["source: "+s["source"]+")</small>" for s in results['metadatas'][0]]
|
98 |
results=results['documents'][0]
|
99 |
combination = zip(results,dists,sources)
|
|
|
93 |
#where={"source": "google-docs"}
|
94 |
#where_document={"$contains":"search_string"}
|
95 |
)
|
96 |
+
dists=["<small>(relevance: "+str(round((1-d)*100/100))+";" for d in results['distances'][0]]
|
97 |
sources=["source: "+s["source"]+")</small>" for s in results['metadatas'][0]]
|
98 |
results=results['documents'][0]
|
99 |
combination = zip(results,dists,sources)
|