update
Browse files
app.py
CHANGED
@@ -64,8 +64,10 @@ def greet(
|
|
64 |
sims = []
|
65 |
for v in vectors:
|
66 |
sims.append(cosine_similarity(v, vector_q))
|
67 |
-
output =
|
68 |
-
output =
|
|
|
|
|
69 |
return output
|
70 |
|
71 |
|
|
|
64 |
sims = []
|
65 |
for v in vectors:
|
66 |
sims.append(cosine_similarity(v, vector_q))
|
67 |
+
# output = list(zip(pairs_id, sims, pairs))
|
68 |
+
# output = sorted(list(zip(pairs_id, sims, pairs)), key=lambda _x: _x[1], reverse=True)
|
69 |
+
# output = {f'candidate {i}: [{p[0]}, {p[1]}]': s for n, (i, s, p) in enumerate(output)}
|
70 |
+
output = {f'candidate {i}: [{p[0]}, {p[1]}]': s for i, s, p in zip(pairs_id, sims, pairs)}
|
71 |
return output
|
72 |
|
73 |
|