This is a fine-tuned version of
BERT-Base-Uncased for binary sentiment classification on the
IMDB dataset. The model is trained to classify movie reviews as either
positive or
negative.
1from transformers import BertForSequenceClassification, BertTokenizer
2
3model_name = "kparkhade/Fine-tuned-BERT-Imdb"
4
5model = BertForSequenceClassification.from_pretrained(model_name)
6tokenizer = BertTokenizer.from_pretrained(model_name)
1from transformers import pipeline
2
3sentiment_pipeline = pipeline("text-classification", model=model_name)
4result = sentiment_pipeline("The movie was absolutely fantastic! I loved it.")
5print(result)
If you use this model, please cite:
@article{devlin2019bert,
title={BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding},
author={Devlin, Jacob and Chang, Ming-Wei and Lee, Kenton and Toutanova, Kristina},
journal={arXiv preprint arXiv:1810.04805},
year={2019}
}
This model is released under the Apache 2.0 License.