Spaces:
Running
Running
AFischer1985
commited on
Commit
•
d41ee7d
1
Parent(s):
0fccdd5
Update run.py
Browse files
run.py
CHANGED
@@ -43,7 +43,7 @@ from chromadb.utils import embedding_functions
|
|
43 |
default_ef = embedding_functions.DefaultEmbeddingFunction()
|
44 |
#sentence_transformer_ef = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="T-Systems-onsite/cross-en-de-roberta-sentence-transformer")
|
45 |
#instructor_ef = embedding_functions.InstructorEmbeddingFunction(model_name="hkunlp/instructor-large", device="cuda")
|
46 |
-
embeddingModel = embedding_functions.
|
47 |
|
48 |
print(str(client.list_collections()))
|
49 |
|
|
|
43 |
default_ef = embedding_functions.DefaultEmbeddingFunction()
|
44 |
#sentence_transformer_ef = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="T-Systems-onsite/cross-en-de-roberta-sentence-transformer")
|
45 |
#instructor_ef = embedding_functions.InstructorEmbeddingFunction(model_name="hkunlp/instructor-large", device="cuda")
|
46 |
+
embeddingModel = embedding_functions.SentenceTransformerEmbeddingFunction(model_name="T-Systems-onsite/cross-en-de-roberta-sentence-transformer", device="cuda" if(onPrem) else "cpu")
|
47 |
|
48 |
print(str(client.list_collections()))
|
49 |
|