Spaces:
Sleeping
Sleeping
Vadim Zhamkov
commited on
Commit
•
3b46e3b
1
Parent(s):
7e00d2a
Change CrossEncoder to the smaller model for faster response
Browse files
backend/semantic_search.py
CHANGED
@@ -36,8 +36,8 @@ def retrieve(query, k):
|
|
36 |
raise gr.Error(str(e))
|
37 |
|
38 |
def reranking(query, retrieval_result):
|
39 |
-
model_name = 'BAAI/bge-reranker-large'
|
40 |
-
|
41 |
model = CrossEncoder(model_name, max_length=512)
|
42 |
|
43 |
# Prepare the list of tuples (query, document) for the model
|
|
|
36 |
raise gr.Error(str(e))
|
37 |
|
38 |
def reranking(query, retrieval_result):
|
39 |
+
# model_name = 'BAAI/bge-reranker-large'
|
40 |
+
model_name = 'cross-encoder/ms-marco-MiniLM-L-6-v2'
|
41 |
model = CrossEncoder(model_name, max_length=512)
|
42 |
|
43 |
# Prepare the list of tuples (query, document) for the model
|