News Classifier — new-clasification-manish
Yeh model news headlines aur articles ko automatically 6 categories mein classify karta hai.
Developed by: Manish Negi — Isuremedia
Base Model: distilbert-base-multilingual-cased
Languages: English + Hindi
Accuracy: 78% (Test Set)
Categories
| ID | Category | Examples |
|---|---|---|
| 0 | politics |
Elections, Government, Parliament, Modi, BJP |
| 1 | sports |
Cricket, IPL, Football, Olympics |
| 2 | business |
Sensex, RBI, Stock Market, Economy |
| 3 | technology |
iPhone, AI, Gadgets, Software |
| 4 | entertainment |
Bollywood, Movies, Celebrities |
| 5 | international |
World News, USA, China, War |
How to Use
Install
pip install transformers torch
Basic Usage
from transformers import pipeline
classifier = pipeline(
"text-classification",
model="dev-isure/new-clasification-manish"
)
# English news
result = classifier("Virat Kohli scores century in IPL match")
print(result)
# [{'label': 'sports', 'score': 0.95}]
# Hindi news
result = classifier("सेंसेक्स 500 अंक गिरा, बाजार में भारी बिकवाली")
print(result)
# [{'label': 'business', 'score': 0.91}]
Multiple Articles
news = [
"PM Modi inaugurates new expressway in UP",
"India beats Australia in T20 series",
"RBI keeps repo rate unchanged at 6.5%",
"Apple launches new iPhone 17 Pro",
"Shah Rukh Khan's new film breaks box office records",
"Russia Ukraine war ceasefire talks begin"
]
results = classifier(news)
for text, res in zip(news, results):
print(f"{res['label']:<15} ({res['score']:.2f}) {text[:50]}")
Training Details
| Detail | Value |
|---|---|
| Base Model | distilbert-base-multilingual-cased |
| Training Articles | 792 |
| Validation Articles | 99 |
| Test Articles | 100 |
| Epochs | 3 |
| Batch Size | 8 |
| Learning Rate | 2e-5 |
| Test Accuracy | 78% |
Training Data Sources
- NDTV, Times of India, The Hindu, Hindustan Times
- Economic Times, ESPN Cricinfo
- BBC Hindi, Aaj Tak, Dainik Bhaskar
- Gadgets360, Bollywood Hungama, Pinkvilla
Limitations
- Health aur Crime categories is model mein nahi hain
- Hinglish (Hindi-English mixed) pe accuracy thodi kam ho sakti hai
- Zyada data se accuracy improve hogi
- Downloads last month
- 7
Model tree for dev-isure/new-clasification-manish
Evaluation results
- Test Accuracyself-reported0.780