sureshbabugandla/ML_OPS_ASSIGNMENT2
016
DistilBERT Book Genre Classifier
A fine-tuned DistilBERT model for classifying book reviews into 8 genres.
Model Description
This model is based on distilbert-base-cased and was fine-tuned on the UCSD Goodreads book reviews dataset. It classifies a given book review text into one of 8 genres.
- Model: distilbert-base-cased
- Task: Multi-class text classification (8 genres)
- Language: English
- License: MIT
Supported Genres
Training Details
Results
Per-Epoch Results
How to Use
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="sureshbabugandla/ML_OPS_ASSIGNMENT2"
)
result = classifier("This book was a thrilling mystery with unexpected twists.")
print(result)Or load the model and tokenizer separately:
from transformers import DistilBertTokenizerFast, DistilBertForSequenceClassification
tokenizer = DistilBertTokenizerFast.from_pretrained("sureshbabugandla/ML_OPS_ASSIGNMENT2")
model = DistilBertForSequenceClassification.from_pretrained("sureshbabugandla/ML_OPS_ASSIGNMENT2")Dataset
The model was trained on the UCSD Book Graph dataset, which contains book reviews from Goodreads across multiple genres. 2,000 reviews were sampled from each of the 8 genres, split into 800 train and 200 test samples per genre.
Developed By
- Name: Suresh Babu Gandla
- Roll Number: G25AIT2119
Links
- GitHub: https://github.com/g25ait2119/MLOpsAssignment2
- W&B Dashboard: https://wandb.ai/g25ait2119-sureshbabu-gandla/mlops-assignment2
- Kaggle Notebook: https://www.kaggle.com/code/sureshbabugandla/mlops-a2-training
