nxphi47 commited on
Commit
1aba676
·
verified ·
1 Parent(s): 14c8d18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -185,7 +185,7 @@ def load_embeddings():
185
  if RAG_EMBED is None:
186
  from langchain_community.embeddings import HuggingFaceEmbeddings, HuggingFaceBgeEmbeddings
187
  print(f'LOading embeddings: {RAG_EMBED_MODEL_NAME}')
188
- RAG_EMBED = HuggingFaceEmbeddings(model_name=RAG_EMBED_MODEL_NAME, model_kwargs={'trust_remote_code':True})
189
  else:
190
  print(f'RAG_EMBED ALREADY EXIST: {RAG_EMBED_MODEL_NAME}: {RAG_EMBED=}')
191
  return RAG_EMBED
 
185
  if RAG_EMBED is None:
186
  from langchain_community.embeddings import HuggingFaceEmbeddings, HuggingFaceBgeEmbeddings
187
  print(f'LOading embeddings: {RAG_EMBED_MODEL_NAME}')
188
+ RAG_EMBED = HuggingFaceEmbeddings(model_name=RAG_EMBED_MODEL_NAME, model_kwargs={'trust_remote_code':True, "device": "cpu"})
189
  else:
190
  print(f'RAG_EMBED ALREADY EXIST: {RAG_EMBED_MODEL_NAME}: {RAG_EMBED=}')
191
  return RAG_EMBED