updated:
Browse files
src/embedding/embedding.py
CHANGED
@@ -1,13 +1,12 @@
|
|
1 |
from langchain_huggingface import HuggingFaceEmbeddings
|
2 |
|
3 |
-
|
4 |
embedding_instance = HuggingFaceEmbeddings(
|
5 |
-
model_name="all-MiniLM-L6-v2",
|
6 |
model_kwargs={"device": "cpu"},
|
7 |
)
|
8 |
|
9 |
def all_minilm_l6_v2():
|
10 |
"""
|
11 |
-
Return the
|
12 |
"""
|
13 |
-
return embedding_instance
|
|
|
1 |
from langchain_huggingface import HuggingFaceEmbeddings
|
2 |
|
|
|
3 |
embedding_instance = HuggingFaceEmbeddings(
|
4 |
+
model_name="sentence-transformers/all-MiniLM-L6-v2",
|
5 |
model_kwargs={"device": "cpu"},
|
6 |
)
|
7 |
|
8 |
def all_minilm_l6_v2():
|
9 |
"""
|
10 |
+
Return the embedding instance.
|
11 |
"""
|
12 |
+
return embedding_instance
|