Views
No views yet
distilbert-base-cased on Goodreads book reviews to classify
text into 7 book genres. Trained as part of an MLOps pipeline (IIT Jodhpur
PGD AI Program) using Kaggle GPU, tracked with Weights & Biases, and
deployed to Hugging Face Hub.| Label | Genre |
|---|---|
| 0 | Poetry |
| 1 | Comics & Graphic |
| 2 | Fantasy & Paranormal |
| 3 | History & Biography |
| 4 | Mystery, Thriller & Crime |
| 5 | Romance |
| 6 | Young Adult |
| Metric | Score |
|---|---|
| Accuracy | 0.6013 |
| Weighted F1 | 0.5979 |
| Eval Loss | 2.2483 |
1from transformers import pipeline
2
3classifier = pipeline(
4 "text-classification",
5 model="DishaSinghania/distilbert-goodreads-genres"
6)
7
8result = classifier("This epic fantasy novel features dragons and ancient magic.")
9print(result)
10# Output: [{'label': 'LABEL_2', 'score': 0.85}] # fantasy & paranormal| Hyperparameter | Value |
|---|---|
| Epochs | 3 |
| Learning rate | 3e-5 |
| Train batch size | 16 |
| Weight decay | 0.01 |
| Max token length | 512 |