kartavya23 commited on
Commit
fdb4a30
1 Parent(s): 8d28803

Upload retriever.py

Browse files
Files changed (1) hide show
  1. rag_101/retriever.py +2 -2
rag_101/retriever.py CHANGED
@@ -114,7 +114,7 @@ def retrieve_context(query, retriever, reranker_model):
114
 
115
 
116
  def load_embedding_model(
117
- model_name: str = "BAAI/bge-large-en-v1.5", device: str = "CPU"
118
  ) -> HuggingFaceEmbeddings:
119
  model_kwargs = {"device": device}
120
  encode_kwargs = {
@@ -129,7 +129,7 @@ def load_embedding_model(
129
 
130
 
131
  def load_reranker_model(
132
- reranker_model_name: str = "BAAI/bge-reranker-large", device: str = "CPU"
133
  ) -> CrossEncoder:
134
  reranker_model = CrossEncoder(
135
  model_name=reranker_model_name, max_length=1024, device=device
 
114
 
115
 
116
  def load_embedding_model(
117
+ model_name: str = "BAAI/bge-large-en-v1.5", device: str = "cpu"
118
  ) -> HuggingFaceEmbeddings:
119
  model_kwargs = {"device": device}
120
  encode_kwargs = {
 
129
 
130
 
131
  def load_reranker_model(
132
+ reranker_model_name: str = "BAAI/bge-reranker-large", device: str = "cpu"
133
  ) -> CrossEncoder:
134
  reranker_model = CrossEncoder(
135
  model_name=reranker_model_name, max_length=1024, device=device