Update reranker.py
Browse files- reranker.py +1 -3
reranker.py
CHANGED
|
@@ -4,11 +4,9 @@ import numpy as np
|
|
| 4 |
# Let's use a reranker to get better results from our semantic search
|
| 5 |
|
| 6 |
def reranker(query, matches):
|
| 7 |
-
docs = matches.matches
|
| 8 |
-
print("matches are:", docs)
|
| 9 |
|
| 10 |
pairs = []
|
| 11 |
-
for match in
|
| 12 |
pairs.append((query, match["metadata"]["text"]))
|
| 13 |
|
| 14 |
model = CrossEncoder('cross-encoder/ms-marco-TinyBERT-L-2-v2', max_length = 512)
|
|
|
|
| 4 |
# Let's use a reranker to get better results from our semantic search
|
| 5 |
|
| 6 |
def reranker(query, matches):
|
|
|
|
|
|
|
| 7 |
|
| 8 |
pairs = []
|
| 9 |
+
for match in matches:
|
| 10 |
pairs.append((query, match["metadata"]["text"]))
|
| 11 |
|
| 12 |
model = CrossEncoder('cross-encoder/ms-marco-TinyBERT-L-2-v2', max_length = 512)
|