Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|