captain-awesome
commited on
Commit
•
b430a6e
1
Parent(s):
a00e62a
Update app.py
Browse files
app.py
CHANGED
@@ -355,17 +355,17 @@ def main():
|
|
355 |
)
|
356 |
st.write("LLM Initialized:")
|
357 |
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl",
|
368 |
-
|
369 |
|
370 |
|
371 |
|
|
|
355 |
)
|
356 |
st.write("LLM Initialized:")
|
357 |
|
358 |
+
model_name = "BAAI/bge-large-en"
|
359 |
+
model_kwargs = {'device': 'cpu'}
|
360 |
+
encode_kwargs = {'normalize_embeddings': False}
|
361 |
+
embeddings = HuggingFaceBgeEmbeddings(
|
362 |
+
model_name=model_name,
|
363 |
+
model_kwargs=model_kwargs,
|
364 |
+
encode_kwargs=encode_kwargs
|
365 |
+
)
|
366 |
+
|
367 |
+
# embeddings = HuggingFaceInstructEmbeddings(model_name="hkunlp/instructor-xl",
|
368 |
+
# model_kwargs={"device": "cpu"})
|
369 |
|
370 |
|
371 |
|