transformers==4.20.1 | |
torch==1.12.0 | |
pandas==1.4.2 | |
git clone https://huggingface.co/google-bert/bert-base-uncased | |
# Load model directly | |
from transformers import AutoTokenizer, AutoModelForMaskedLM | |
tokenizer = AutoTokenizer.from_pretrained("google-bert/bert-base-uncased") | |
model = AutoModelForMaskedLM.from_pretrained("google-bert/bert-base-uncased") | |
# Use a pipeline as a high-level helper | |
from transformers import pipeline | |
pipe = pipeline("fill-mask", model="google-bert/bert-base-uncased") |