PrabakaranC commited on
Commit
b51836e
·
verified ·
1 Parent(s): 73661dd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ from langchain_community.embeddings import HuggingFaceEmbeddings
5
  from flashrank import Ranker, RerankRequest
6
 
7
 
8
- @st.cache
9
  def get_embeddings():
10
  model_name = "BAAI/bge-large-en-v1.5"
11
  model_kwargs = {'device': 'cpu',"trust_remote_code":True}
@@ -17,7 +17,7 @@ def get_embeddings():
17
  return model
18
 
19
  baai_embeddings = get_embeddings()
20
- kadhal_Server = FAISS.from_local("./",baai_embeddings)
21
  ranker = Ranker(model_name="ms-marco-MiniLM-L-12-v2", cache_dir="/opt")
22
 
23
 
 
5
  from flashrank import Ranker, RerankRequest
6
 
7
 
8
+ @st.cache_data
9
  def get_embeddings():
10
  model_name = "BAAI/bge-large-en-v1.5"
11
  model_kwargs = {'device': 'cpu',"trust_remote_code":True}
 
17
  return model
18
 
19
  baai_embeddings = get_embeddings()
20
+ kadhal_Server = FAISS.load_local("./",baai_embeddings)
21
  ranker = Ranker(model_name="ms-marco-MiniLM-L-12-v2", cache_dir="/opt")
22
 
23