π° DistilBERT AG News Classifier
This is a fine-tuned DistilBERT model for news article classification based on the AG News dataset.
It categorizes news articles into four categories:
- π World
- ποΈ Politics (also known as Business in AG News)
- π» Tech
- π Sports
π§ Model Details
- Base model:
distilbert-base-uncased - Framework: PyTorch with Hugging Face Transformers
- Trained on: AG News dataset
- Use case: Classify news snippets or headlines into one of 4 classes
ποΈ Dataset
AG News is a news classification dataset with 4 categories:
- World
- Sports
- Business
- Sci/Tech
Each sample consists of a title and description.
π₯ How to Use
With Transformers (Python):
from transformers import pipeline
classifier = pipeline("text-classification", model="sh1fu-0/distilbert-agnews-classifier")
result = classifier("NASA's new telescope discovers water vapor on a distant exoplanet.")
print(result)
- Downloads last month
- -