Spaces:
Running
Running
Clement Vachet
commited on
Commit
·
c8e3c55
1
Parent(s):
1daf9a1
Update HF embedding for multiple languages
Browse files
app.py
CHANGED
@@ -59,9 +59,9 @@ def create_db(splits, collection_name):
|
|
59 |
"""Create embeddings and vector database"""
|
60 |
|
61 |
embedding = HuggingFaceEmbeddings(
|
62 |
-
|
63 |
# model_name="sentence-transformers/all-MiniLM-L6-v2",
|
64 |
-
|
65 |
# encode_kwargs={'normalize_embeddings': False}
|
66 |
)
|
67 |
new_client = chromadb.EphemeralClient()
|
|
|
59 |
"""Create embeddings and vector database"""
|
60 |
|
61 |
embedding = HuggingFaceEmbeddings(
|
62 |
+
model_name="sentence-transformers/paraphrase-multilingual-mpnet-base-v2",
|
63 |
# model_name="sentence-transformers/all-MiniLM-L6-v2",
|
64 |
+
model_kwargs={'device': 'cpu'},
|
65 |
# encode_kwargs={'normalize_embeddings': False}
|
66 |
)
|
67 |
new_client = chromadb.EphemeralClient()
|