Downloads · 30 days
90
4% of all-time downloads
josu/albert-pt-br
albert-pt-br is a fill-mask model from josu. Use it when you need the model to fill a missing word. It is set up for transformers.
Downloads · 30 days
90
4% of all-time downloads
All-time downloads
2.5K
Public
Repo size
92.7 MB
Likes
1
Public
Click a slice to open those files.
.bin45.9 MB · 95%
From the Hugging Face model README
from transformers import pipeline, AlbertTokenizer, AlbertForMaskedLM
model = AlbertForMaskedLM.from_pretrained('josu/albert-pt-br')
tokenizer = AlbertTokenizer.from_pretrained('josu/albert-pt-br')
unmasker = pipeline('fill-mask', model=model, tokenizer=tokenizer ,device=0)
text = 'Marte está no [MASK] solar.'
unmasker(text)
[{'score': 0.7004144191741943,
'token': 244,
'token_str': 'sistema',
'sequence': 'marte esta no sistema solar.'},
{'score': 0.02539917267858982,
'token': 4077,
'token_str': 'solar',
'sequence': 'marte esta no solar solar.'},
{'score': 0.020301498472690582,
'token': 49,
'token_str': 'seu',
'sequence': 'marte esta no seu solar.'},
{'score': 0.01753508299589157,
'token': 482,
'token_str': 'centro',
'sequence': 'marte esta no centro solar.'},
{'score': 0.013344300910830498,
'token': 1401,
'token_str': 'plano',
'sequence': 'marte esta no plano solar.'}]