Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files- retriever.py +1 -1
retriever.py
CHANGED
@@ -21,7 +21,7 @@ class Retriever:
|
|
21 |
|
22 |
# Initialize SBERT
|
23 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
24 |
-
sbert = SentenceTransformer('sentence-transformers/all-distilroberta-v1', device=device)
|
25 |
|
26 |
# Load or tokenize documents
|
27 |
if os.path.exists(self.tokenized_docs_path) and os.path.exists(self.bm25_path) and os.path.exists(self.sbert_embeddings_path):
|
|
|
21 |
|
22 |
# Initialize SBERT
|
23 |
device = 'cuda' if torch.cuda.is_available() else 'cpu'
|
24 |
+
self.sbert = SentenceTransformer('sentence-transformers/all-distilroberta-v1', device=device)
|
25 |
|
26 |
# Load or tokenize documents
|
27 |
if os.path.exists(self.tokenized_docs_path) and os.path.exists(self.bm25_path) and os.path.exists(self.sbert_embeddings_path):
|