Update README.md
Browse files
README.md
CHANGED
@@ -1173,8 +1173,8 @@ from sentence_transformers import SentenceTransformer
|
|
1173 |
from numpy.linalg import norm
|
1174 |
|
1175 |
cos_sim = lambda a,b: (a @ b.T) / (norm(a)*norm(b))
|
1176 |
-
model = SentenceTransformer('jinaai/jina-embeddings-v2-base-
|
1177 |
-
embeddings = model.encode(['How is the weather today?', '
|
1178 |
print(cos_sim(embeddings[0], embeddings[1]))
|
1179 |
```
|
1180 |
|
|
|
1173 |
from numpy.linalg import norm
|
1174 |
|
1175 |
cos_sim = lambda a,b: (a @ b.T) / (norm(a)*norm(b))
|
1176 |
+
model = SentenceTransformer('jinaai/jina-embeddings-v2-base-zh', trust_remote_code=True)
|
1177 |
+
embeddings = model.encode(['How is the weather today?', '今天天气怎么样?'])
|
1178 |
print(cos_sim(embeddings[0], embeddings[1]))
|
1179 |
```
|
1180 |
|