Update README.md
Browse files
README.md
CHANGED
@@ -69,7 +69,7 @@ Then you can use the model like this:
|
|
69 |
from sentence_transformers import SentenceTransformer
|
70 |
sentences = ["Isto é um exemplo", "Isto é um outro exemplo"]
|
71 |
|
72 |
-
model = SentenceTransformer('stjiris/bert-large-portuguese-cased-legal-mlm-sts-
|
73 |
embeddings = model.encode(sentences)
|
74 |
print(embeddings)
|
75 |
```
|
@@ -89,8 +89,8 @@ def mean_pooling(model_output, attention_mask):
|
|
89 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
90 |
|
91 |
# Load model from HuggingFace Hub
|
92 |
-
tokenizer = AutoTokenizer.from_pretrained('stjiris/bert-large-portuguese-cased-legal-mlm-sts-
|
93 |
-
model = AutoModel.from_pretrained('stjiris/bert-large-portuguese-cased-legal-mlm-sts-
|
94 |
|
95 |
# Tokenize sentences
|
96 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
69 |
from sentence_transformers import SentenceTransformer
|
70 |
sentences = ["Isto é um exemplo", "Isto é um outro exemplo"]
|
71 |
|
72 |
+
model = SentenceTransformer('stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1')
|
73 |
embeddings = model.encode(sentences)
|
74 |
print(embeddings)
|
75 |
```
|
|
|
89 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
90 |
|
91 |
# Load model from HuggingFace Hub
|
92 |
+
tokenizer = AutoTokenizer.from_pretrained('stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1')
|
93 |
+
model = AutoModel.from_pretrained('stjiris/bert-large-portuguese-cased-legal-mlm-sts-v1')
|
94 |
|
95 |
# Tokenize sentences
|
96 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|