Views
No views yet
| Label | ID |
|---|---|
| Business | 0 |
| Opinion | 1 |
| Political_gossip | 2 |
| Sports | 3 |
| World_news | 4 |
1from transformers import pipeline
2
3classifier = pipeline("text-classification", model="Dineth0627/daily-mirror-news-classifier_")
4result = classifier("The Central Bank raised rates to curb inflation.")
5print(result) # [{'label': 'Business', 'score': 0.97}]| Setting | Value |
|---|---|
| Base model | distilbert-base-uncased |
| Epochs | 4 (EarlyStopping patience=2) |
| Learning rate | 2e-5 |
| Batch size | 16 |
| Max sequence length | 128 |
| Warmup ratio | 0.10 |
| Weight decay | 0.01 |
| Optimiser | AdamW + linear schedule |