BERT (Bidirectional Encoder Representations from Transformers)

BERT bert-base-uncased' model in 4 lines
————————————————————————————————————
!pip install transformers

————————————————————————————————————
from transformers import pipeline
unmasker = pipeline('fill-mask', model='bert-base-uncased')
unmasker("Artificial Intelligence [MASK] take over the world.")

————————————————————————————————————

Full code:

Leave a Reply

Your email address will not be published. Required fields are marked *