Spaces:
Build error
Build error
solve custom code issue with workaround
Browse files- langchainapp.py +1 -1
- requirements.txt +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 |
|
requirements.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
huggingface_hub
|
2 |
einops
|
3 |
-
sentence-transformers
|
4 |
torch==2.2.0
|
5 |
transformers
|
6 |
openai
|
|
|
1 |
huggingface_hub
|
2 |
einops
|
3 |
+
sentence-transformers==2.3.1
|
4 |
torch==2.2.0
|
5 |
transformers
|
6 |
openai
|