fancyzhx/ag_news
Viewer • Updated • 128k • 119k • 190
This model classifies news articles into 4 categories: World, Sports, Business, and Sci/Tech.
| Metric | Score |
|---|---|
| Accuracy | 0.9447 |
| F1 Score | 0.9447 |
| ID | Label |
|---|---|
| 0 | World |
| 1 | Sports |
| 2 | Business |
| 3 | Sci/Tech |
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="samandar1105/news-classifier"
)
result = classifier("Apple reported record quarterly earnings.")
print(result) # [{'label': 'Business', 'score': 0.98}]