Update README.md
Browse filesFixed model path in the example.
README.md
CHANGED
@@ -31,7 +31,7 @@ Then you can use the model like this:
|
|
31 |
from sentence_transformers import SentenceTransformer
|
32 |
sentences = ["Ala ma kota", "Ala ma psa"]
|
33 |
|
34 |
-
model = SentenceTransformer('polish-roberta-large-v2-sts')
|
35 |
embeddings = model.encode(sentences)
|
36 |
print(embeddings)
|
37 |
```
|
@@ -57,8 +57,8 @@ def mean_pooling(model_output, attention_mask):
|
|
57 |
sentences = ['Ala ma kota', 'Ala ma psa']
|
58 |
|
59 |
# Load model from HuggingFace Hub
|
60 |
-
tokenizer = AutoTokenizer.from_pretrained('polish-roberta-large-v2-sts')
|
61 |
-
model = AutoModel.from_pretrained('polish-roberta-large-v2-sts')
|
62 |
|
63 |
# Tokenize sentences
|
64 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
31 |
from sentence_transformers import SentenceTransformer
|
32 |
sentences = ["Ala ma kota", "Ala ma psa"]
|
33 |
|
34 |
+
model = SentenceTransformer('radlab/polish-roberta-large-v2-sts')
|
35 |
embeddings = model.encode(sentences)
|
36 |
print(embeddings)
|
37 |
```
|
|
|
57 |
sentences = ['Ala ma kota', 'Ala ma psa']
|
58 |
|
59 |
# Load model from HuggingFace Hub
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained('radlab/polish-roberta-large-v2-sts')
|
61 |
+
model = AutoModel.from_pretrained('radlab/polish-roberta-large-v2-sts')
|
62 |
|
63 |
# Tokenize sentences
|
64 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|