Spaces:
Paused
Paused
Commit
·
831b19e
1
Parent(s):
b6ddd55
Update mapper.py
Browse files
mapper.py
CHANGED
|
@@ -9,10 +9,4 @@ class Mapper:
|
|
| 9 |
data_emb = self.__model.encode(data)
|
| 10 |
|
| 11 |
scores: list[float] = util.dot_score(query_emb, data_emb)[0].cpu().tolist()
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
return sorted(
|
| 15 |
-
data_score_pairs,
|
| 16 |
-
key=lambda x: x[1],
|
| 17 |
-
reverse=True,
|
| 18 |
-
)
|
|
|
|
| 9 |
data_emb = self.__model.encode(data)
|
| 10 |
|
| 11 |
scores: list[float] = util.dot_score(query_emb, data_emb)[0].cpu().tolist()
|
| 12 |
+
return sorted(scores, reverse=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|