Downloads · 30 days
5
23% of all-time downloads
Raissa2502/movie-genre-classifier
movie-genre-classifier is a text classification model from Raissa2502. Use it when you need a label for a piece of text. It is set up for transformers.
This model is a DistilBERT-based text classification model fine-tuned to predict movie genres from plot summaries.
Downloads · 30 days
5
23% of all-time downloads
All-time downloads
22
Public
Parameters
68.7M
550 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors275 MB · 100%
From the Hugging Face model README
This model is a DistilBERT-based text classification model fine-tuned to predict movie genres from plot summaries.
<!-- Provide a longer summary of what this model is. -->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.
from transformers import DistilBertTokenizerFast, DistilBertForSequenceClassification, pipeline
tokenizer = DistilBertTokenizerFast.from_pretrained("Raissa2502/movie-genre-classifier")
model = DistilBertForSequenceClassification.from_pretrained("Raissa2502/movie-genre-classifier")
classifier = pipeline("text-classification", model=model, tokenizer=tokenizer)
prediction = classifier(
"A young wizard discovers he has magical powers and attends a school for wizards."
)
print(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.
3 epochs, batch size 8, learning rate 5e-5
The model was evaluated using:
These metrics are appropriate for multi-class genre classification and help measure overall performance while accounting for class imbalance.