Downloads · 30 days
6
11% of all-time downloads
Prakhar54-byte/distilbert-goodreads-genre-classifier
distilbert-goodreads-genre-classifier is a text classification model from Prakhar54-byte. Use it when you need a label for a piece of text. It is set up for transformers.
A fine-tuned DistilBERT (distilbert-base-cased) model for classifying Goodreads book reviews into 8 genres.
Downloads · 30 days
6
11% of all-time downloads
All-time downloads
55
Public
Parameters
65.8M
263 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors263 MB · 100%
From the Hugging Face model README
A fine-tuned DistilBERT (distilbert-base-cased) model for classifying Goodreads book reviews into 8 genres.
distilbert-base-cased| ID | Genre |
|---|---|
| 0 | children |
| 1 | comics_graphic |
| 2 | fantasy_paranormal |
| 3 | history_biography |
| 4 | mystery_thriller_crime |
| 5 | poetry |
| 6 | romance |
| 7 | young_adult |
| Metric | Score |
|---|---|
| Accuracy | 0.6081 |
| Weighted F1 | 0.6054 |
| Weighted Precision | 0.6034 |
| Loss | 1.2691 |
| Genre | Precision | Recall | F1-Score |
|---|---|---|---|
| children | 0.62 | 0.66 | 0.64 |
| comics_graphic | 0.76 | 0.77 | 0.77 |
| fantasy_paranormal | 0.43 | 0.43 | 0.43 |
| history_biography | 0.59 | 0.60 | 0.60 |
| mystery_thriller_crime | 0.60 | 0.62 | 0.61 |
| poetry | 0.78 | 0.81 | 0.79 |
| romance | 0.62 | 0.61 | 0.61 |
| young_adult | 0.43 | 0.36 | 0.39 |
from transformers import pipeline
classifier = pipeline("text-classification", model="Prakhar54-byte/distilbert-goodreads-genre-classifier")
result = classifier("A thrilling mystery novel with unexpected twists")
print(result)