Spaces:
Runtime error
Runtime error
as-cle-bert
commited on
Create load_encoder.py
Browse files- load_encoder.py +6 -0
load_encoder.py
ADDED
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from sentence_transformers import SentenceTransformer
|
2 |
+
|
3 |
+
encoder = SentenceTransformer(
|
4 |
+
"jinaai/jina-embeddings-v2-base-en", # switch to en/zh for English or Chinese
|
5 |
+
trust_remote_code=True
|
6 |
+
)
|