Instructions to use Senujide/news_classifier with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Senujide/news_classifier with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="Senujide/news_classifier")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("Senujide/news_classifier") model = AutoModelForSequenceClassification.from_pretrained("Senujide/news_classifier", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Daily Mirror News Classifier
This model is a fine-tuned version of distilbert-base-uncased on a custom dataset of Sri Lankan news from the Daily Mirror.
Training Results (Peak Performance)
The model was trained for 5 epochs. The following metrics represent the best-performing version (Epoch 4), which achieved a high level of accuracy and balance.
- Accuracy: 90.15%
- F1-Score (Weighted): 90.23%
- Precision (Weighted): 90.37%
- Recall (Weighted): 90.15%
Classification Categories
The model is configured to classify news articles into the following 5 labels:
- Business
- Opinion
- Political gossip
- Sports
- World news
How to Use?
You can use this model directly with the Hugging Face pipeline:
from transformers import pipeline
classifier = pipeline("text-classification", model="Senujide/news_classifier")
text = "The national team won the match in the final over."
print(classifier(text))
- Downloads last month
- 15