CoolFace
Apppublic

ThinhLLM/IMDB_Sentiment_Classification_With_Bert

sourceHugging Facemitupdated 1y agoView on Hugging Face
0likes
model.py9 linesDownload Raw Back to root
1 2from transformers import AutoTokenizer, AutoModelForSequenceClassification3 4def create_bert():5    model_ckpt = "bert-base-uncased"6    tokenizer = AutoTokenizer.from_pretrained(model_ckpt)7    model = AutoModelForSequenceClassification.from_pretrained(model_ckpt,num_labels=2)8    return model, tokenizer9