Spaces:
Sleeping
Sleeping
Update rag_utils.py
Browse files- rag_utils.py +2 -2
rag_utils.py
CHANGED
|
@@ -87,8 +87,8 @@ class HybridSearchManager:
|
|
| 87 |
self.document_chunks = []
|
| 88 |
self.document_embeddings = None
|
| 89 |
# Initialize BGE reranker model
|
| 90 |
-
self.reranker = CrossEncoder('
|
| 91 |
-
print("
|
| 92 |
|
| 93 |
async def initialize_models(self, documents: list[Document]):
|
| 94 |
self.document_chunks = documents
|
|
|
|
| 87 |
self.document_chunks = []
|
| 88 |
self.document_embeddings = None
|
| 89 |
# Initialize BGE reranker model
|
| 90 |
+
self.reranker = CrossEncoder('cross-encoder/ms-marco-MiniLM-L6-v2', device='cuda' if torch.cuda.is_available() else 'cpu')
|
| 91 |
+
print("ms-marco-MiniLM-L6-v2 Reranker initialized.")
|
| 92 |
|
| 93 |
async def initialize_models(self, documents: list[Document]):
|
| 94 |
self.document_chunks = documents
|