Spaces:
Build error
Build error
Trying to fix BAAI/BGE
Browse files- app_final.py +2 -2
app_final.py
CHANGED
@@ -26,7 +26,7 @@ from langchain_core.runnables import RunnablePassthrough, RunnableLambda, Runnab
|
|
26 |
from langchain_core.runnables import chain
|
27 |
|
28 |
import langchain_community.embeddings.huggingface
|
29 |
-
from langchain_community.embeddings.huggingface import
|
30 |
from langchain_community.vectorstores import FAISS
|
31 |
|
32 |
from langchain.chains import LLMChain
|
@@ -91,7 +91,7 @@ model_name = "BAAI/bge-large-en-v1.5"
|
|
91 |
model_kwargs = {"device": "cpu"}
|
92 |
encode_kwargs = {"normalize_embeddings": True}
|
93 |
if "embeddings" not in st.session_state:
|
94 |
-
st.session_state.embeddings =
|
95 |
model_name=model_name,
|
96 |
model_kwargs = model_kwargs,
|
97 |
encode_kwargs = encode_kwargs)
|
|
|
26 |
from langchain_core.runnables import chain
|
27 |
|
28 |
import langchain_community.embeddings.huggingface
|
29 |
+
from langchain_community.embeddings.huggingface import HuggingFaceEmbeddings
|
30 |
from langchain_community.vectorstores import FAISS
|
31 |
|
32 |
from langchain.chains import LLMChain
|
|
|
91 |
model_kwargs = {"device": "cpu"}
|
92 |
encode_kwargs = {"normalize_embeddings": True}
|
93 |
if "embeddings" not in st.session_state:
|
94 |
+
st.session_state.embeddings = HuggingFaceEmbeddings(
|
95 |
model_name=model_name,
|
96 |
model_kwargs = model_kwargs,
|
97 |
encode_kwargs = encode_kwargs)
|