dzenzzz commited on
Commit
0dfabf7
·
1 Parent(s): 6152e61

adds token

Browse files
Files changed (1) hide show
  1. neural_searcher.py +2 -3
neural_searcher.py CHANGED
@@ -2,15 +2,14 @@ from qdrant_client import QdrantClient
2
  from fastembed import SparseTextEmbedding, LateInteractionTextEmbedding
3
  from qdrant_client import QdrantClient, models
4
  from sentence_transformers import SentenceTransformer
5
- from collections import Counter
6
- from config import DENSE_MODEL, SPARSE_MODEL, LATE_INTERACTION_MODEL, QDRANT_URL, QDRANT_API_KEY
7
  import os
8
 
9
  class NeuralSearcher:
10
 
11
  def __init__(self, collection_name):
12
  self.collection_name = collection_name
13
- self.dense_model = SentenceTransformer(DENSE_MODEL,device="cpu")
14
  self.sparse_model = SparseTextEmbedding(SPARSE_MODEL)
15
  self.late_interaction_model = LateInteractionTextEmbedding(LATE_INTERACTION_MODEL)
16
  self.qdrant_client = QdrantClient(QDRANT_URL,api_key=QDRANT_API_KEY)
 
2
  from fastembed import SparseTextEmbedding, LateInteractionTextEmbedding
3
  from qdrant_client import QdrantClient, models
4
  from sentence_transformers import SentenceTransformer
5
+ from config import DENSE_MODEL, SPARSE_MODEL, LATE_INTERACTION_MODEL, QDRANT_URL, QDRANT_API_KEY,HUGGING_FACE_API_KEY
 
6
  import os
7
 
8
  class NeuralSearcher:
9
 
10
  def __init__(self, collection_name):
11
  self.collection_name = collection_name
12
+ self.dense_model = SentenceTransformer(DENSE_MODEL,device="cpu",token=HUGGING_FACE_API_KEY)
13
  self.sparse_model = SparseTextEmbedding(SPARSE_MODEL)
14
  self.late_interaction_model = LateInteractionTextEmbedding(LATE_INTERACTION_MODEL)
15
  self.qdrant_client = QdrantClient(QDRANT_URL,api_key=QDRANT_API_KEY)