This model is a DistilBERT-based text classification model fine-tuned to predict
movie genres from plot summaries.
This is the model card of a 🤗 transformers model that has been pushed on the Hub. This model card has been automatically generated.
Automatically classify movies by genre from plot summaries. This model is intended for educational and academic purposes, such as
demonstrating NLP text classification and fine-tuning transformer models.
1from transformers import DistilBertTokenizerFast, DistilBertForSequenceClassification, pipeline
2
3tokenizer = DistilBertTokenizerFast.from_pretrained("Raissa2502/movie-genre-classifier")
4model = DistilBertForSequenceClassification.from_pretrained("Raissa2502/movie-genre-classifier")
5
6classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
7
8prediction = classifier(
9 "A young wizard discovers he has magical powers and attends a school for wizards."
10)
11
12print(prediction)
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
These metrics are appropriate for multi-class genre classification and help
measure overall performance while accounting for class imbalance.