Update reranker.py
Browse files- reranker.py +1 -1
reranker.py
CHANGED
@@ -14,5 +14,5 @@ def reranker(query, matches):
|
|
14 |
|
15 |
scores = model.predict(pairs)
|
16 |
top_indices = np.argsort(scores)[::-5]
|
17 |
-
top_results = ["Class: " +
|
18 |
return top_results
|
|
|
14 |
|
15 |
scores = model.predict(pairs)
|
16 |
top_indices = np.argsort(scores)[::-5]
|
17 |
+
top_results = ["Class: " + matches[index]["metadata"]["text"] for index in top_indices]
|
18 |
return top_results
|