npl-course / app.py
jcancela's picture
Fixed mask token
cc3b2b2
Raw
History Blame Contribute Delete
253 Bytes
import streamlit as st
from transformers import pipeline
mask = pipeline("fill-mask", model="bert-base-uncased")
result = mask("The best internet company is [MASK] because of the value it adds to its customers and stakeholders.", top_k=2)
print(result)