updated model path in the examples
Browse files
README.md
CHANGED
@@ -38,7 +38,7 @@ Then you can use the model like this:
|
|
38 |
from sentence_transformers import SentenceTransformer
|
39 |
sentences = ['Ala ma kota i psa, widzi dzisiaj też śnieg', 'Ewa ma białe zęby']
|
40 |
|
41 |
-
model = SentenceTransformer('
|
42 |
embeddings = model.encode(sentences)
|
43 |
print(embeddings)
|
44 |
```
|
@@ -64,8 +64,8 @@ def mean_pooling(model_output, attention_mask):
|
|
64 |
sentences = ['Ala ma kota i psa, widzi dzisiaj też śnieg', 'Ewa ma białe zęby']
|
65 |
|
66 |
# Load model from HuggingFace Hub
|
67 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
68 |
-
model = AutoModel.from_pretrained('
|
69 |
|
70 |
# Tokenize sentences
|
71 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
38 |
from sentence_transformers import SentenceTransformer
|
39 |
sentences = ['Ala ma kota i psa, widzi dzisiaj też śnieg', 'Ewa ma białe zęby']
|
40 |
|
41 |
+
model = SentenceTransformer('radlab/polish-bi-encoder-mean')
|
42 |
embeddings = model.encode(sentences)
|
43 |
print(embeddings)
|
44 |
```
|
|
|
64 |
sentences = ['Ala ma kota i psa, widzi dzisiaj też śnieg', 'Ewa ma białe zęby']
|
65 |
|
66 |
# Load model from HuggingFace Hub
|
67 |
+
tokenizer = AutoTokenizer.from_pretrained('radlab/polish-bi-encoder-mean')
|
68 |
+
model = AutoModel.from_pretrained('radlab/polish-bi-encoder-mean')
|
69 |
|
70 |
# Tokenize sentences
|
71 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|