joaomsimoes commited on
Commit
aee4743
1 Parent(s): af84dc6

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +10 -0
README.md CHANGED
@@ -1,5 +1,15 @@
1
  # BERTpt
2
 
 
 
 
 
 
 
 
 
 
 
3
  Pretrained model on Portuguese (Portugal) language using a masked language modeling (MLM) objective. [Notebook](https://colab.research.google.com/drive/1OaSDl7oVrbg2tYrT24xWPWxAyKmu4cNp?usp=sharing)
4
 
5
  ## Training data
 
1
  # BERTpt
2
 
3
+ ```
4
+ from transformers import BertModel, BertTokenizerFast
5
+ tokenizer = BertTokenizerFast.from_pretrained('joaomsimoes/bertpt-portuguese-portugal')
6
+ model = BertModel.from_pretrained("joaomsimoes/bertpt-portuguese-portugal")
7
+
8
+ text = "Tudo vale a pena quando a alma não é pequena."
9
+ encoded_input = tokenizer(text, return_tensors='pt')
10
+ output = model(**encoded_input)
11
+ ```
12
+
13
  Pretrained model on Portuguese (Portugal) language using a masked language modeling (MLM) objective. [Notebook](https://colab.research.google.com/drive/1OaSDl7oVrbg2tYrT24xWPWxAyKmu4cNp?usp=sharing)
14
 
15
  ## Training data