|
|
--- |
|
|
language: en |
|
|
license: apache-2.0 |
|
|
tags: |
|
|
- text-classification |
|
|
- news-classification |
|
|
- bbc |
|
|
- transformers |
|
|
- pytorch |
|
|
datasets: |
|
|
- bbc |
|
|
metrics: |
|
|
- accuracy |
|
|
model_type: bert |
|
|
--- |
|
|
## π Demo |
|
|
π https://huggingface.co/spaces/Asphate/nanoclass-bbc-demo |
|
|
|
|
|
# NanoClass-BBC |
|
|
|
|
|
**NanoClass-BBC** is a lightweight text classification model trained on the **BBC News dataset**. |
|
|
It classifies news articles into predefined categories such as politics, business, sport, tech, and entertainment. |
|
|
|
|
|
## π Dataset |
|
|
- **BBC News Dataset** |
|
|
- Publicly available dataset containing labeled news articles |
|
|
- Used strictly for research and educational purposes |
|
|
|
|
|
## π·οΈ Labels |
|
|
The model predicts one of the following classes: |
|
|
- Business |
|
|
- Entertainment |
|
|
- Politics |
|
|
- Sport |
|
|
- Tech |
|
|
|
|
|
## π Usage |
|
|
|
|
|
```python |
|
|
from transformers import pipeline |
|
|
|
|
|
classifier = pipeline( |
|
|
"text-classification", |
|
|
model="Asphate/nanoclass-bbc" |
|
|
) |
|
|
|
|
|
classifier("The stock market saw major gains today after the policy announcement.") |
|
|
|