luismsgomes
commited on
Commit
·
057971a
1
Parent(s):
94729b5
fixed README
Browse files
README.md
CHANGED
@@ -31,7 +31,7 @@ Then you can use the model like this:
|
|
31 |
from sentence_transformers import SentenceTransformer
|
32 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
33 |
|
34 |
-
model = SentenceTransformer('serafim-335m-portuguese-pt-sentence-encoder')
|
35 |
embeddings = model.encode(sentences)
|
36 |
print(embeddings)
|
37 |
```
|
@@ -57,8 +57,8 @@ def mean_pooling(model_output, attention_mask):
|
|
57 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
58 |
|
59 |
# Load model from HuggingFace Hub
|
60 |
-
tokenizer = AutoTokenizer.from_pretrained('serafim-335m-portuguese-pt-sentence-encoder')
|
61 |
-
model = AutoModel.from_pretrained('serafim-335m-portuguese-pt-sentence-encoder')
|
62 |
|
63 |
# Tokenize sentences
|
64 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
@@ -80,7 +80,7 @@ print(sentence_embeddings)
|
|
80 |
|
81 |
<!--- Describe how your model was evaluated -->
|
82 |
|
83 |
-
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=serafim-335m-portuguese-pt-sentence-encoder)
|
84 |
|
85 |
|
86 |
## Training
|
|
|
31 |
from sentence_transformers import SentenceTransformer
|
32 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
33 |
|
34 |
+
model = SentenceTransformer('PORTULAN/serafim-335m-portuguese-pt-sentence-encoder')
|
35 |
embeddings = model.encode(sentences)
|
36 |
print(embeddings)
|
37 |
```
|
|
|
57 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
58 |
|
59 |
# Load model from HuggingFace Hub
|
60 |
+
tokenizer = AutoTokenizer.from_pretrained('PORTULAN/serafim-335m-portuguese-pt-sentence-encoder')
|
61 |
+
model = AutoModel.from_pretrained('PORTULAN/serafim-335m-portuguese-pt-sentence-encoder')
|
62 |
|
63 |
# Tokenize sentences
|
64 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
80 |
|
81 |
<!--- Describe how your model was evaluated -->
|
82 |
|
83 |
+
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=PORTULAN/serafim-335m-portuguese-pt-sentence-encoder)
|
84 |
|
85 |
|
86 |
## Training
|