Spaces:
Build error
Build error
solve custom code issue with workaround
Browse files- langchainapp.py +1 -1
langchainapp.py
CHANGED
@@ -62,7 +62,7 @@ class MyEmbeddingFunction(EmbeddingFunction):
|
|
62 |
self.intention_client = intention_client
|
63 |
self.hf_embeddings = HuggingFaceInstructEmbeddings(
|
64 |
model_name=model_name,
|
65 |
-
model_kwargs={'device': 'cuda' if torch.cuda.is_available() else 'cpu'
|
66 |
encode_kwargs={'normalize_embeddings': True}
|
67 |
)
|
68 |
|
|
|
62 |
self.intention_client = intention_client
|
63 |
self.hf_embeddings = HuggingFaceInstructEmbeddings(
|
64 |
model_name=model_name,
|
65 |
+
model_kwargs={'device': 'cuda' if torch.cuda.is_available() else 'cpu'} #, "trust_remote_code": True},
|
66 |
encode_kwargs={'normalize_embeddings': True}
|
67 |
)
|
68 |
|