Spaces:
Sleeping
Sleeping
Update retriever.py
Browse files- retriever.py +3 -3
retriever.py
CHANGED
@@ -112,9 +112,9 @@ class Retriever:
|
|
112 |
# Sort the documents by their BM25 scores in descending order
|
113 |
sorted_doc_indices = np.argsort(scores)
|
114 |
|
115 |
-
print("Score:", scores[sorted_doc_indices[-
|
116 |
-
print(self.docs[sorted_doc_indices[-
|
117 |
-
print("Doc number:", sorted_doc_indices[-
|
118 |
|
119 |
result_docs = [self.docs[i] for i in sorted_doc_indices[-n:] if scores[i] > 0]
|
120 |
|
|
|
112 |
# Sort the documents by their BM25 scores in descending order
|
113 |
sorted_doc_indices = np.argsort(scores)
|
114 |
|
115 |
+
print("Score:", scores[sorted_doc_indices[-1]] )
|
116 |
+
print(self.docs[sorted_doc_indices[-1]])
|
117 |
+
print("Doc number:", sorted_doc_indices[-1])
|
118 |
|
119 |
result_docs = [self.docs[i] for i in sorted_doc_indices[-n:] if scores[i] > 0]
|
120 |
|