Thareesh Prabakaran
Update README.md
2a200fe verified
metadata
license: mit
base_model:
  - google-bert/bert-base-uncased
pipeline_tag: text-classification
tags:
  - bbc-news-classification
  - bert

BBC News Classification with BERT

Overview

This model classifies BBC news articles into five categories: Business, Entertainment, Politics, Sport, and Tech. It is fine-tuned using a pre-trained BERT model to achieve high accuracy in text classification.

Dataset

The model is trained on the BBC News dataset, which consists of categorized news articles. The dataset contains training and test splits.

  • Train Dataset: Contains labeled news articles.
  • Test Dataset: Contains unlabeled news articles for evaluation.

Model Details

  • Base Model: bert-base-uncased
  • Training Framework: PyTorch with Hugging Face Transformers
  • Batch Size: 16
  • Optimizer: Adam with Learning Rate Scheduling

How to Use

You can use this model to classify BBC news articles into one of the five categories. Below is an example using the Hugging Face Transformers library:

from transformers import pipeline

classifier = pipeline("text-classification", model="NotThareesh/BBC-News-Classifier-BERT")

labels = {"LABEL_0": "Business", "LABEL_1": "Entertainment", "LABEL_2": "Politics", "LABEL_3": "Sport", "LABEL_4": "Tech"}

text = "The stock market saw a significant rise today after tech companies reported high earnings."
result = classifier(text)

print(f"Predicted Label: {labels[result[0]['label']]}, Accuracy Score: {result[0]['score']}")  # Predicted Label: Business, Accuracy: 0.996

Model Performance

  • Accuracy: Achieved over 99% accuracy on the validation dataset.
  • Evaluation: The model performs consistently on Precision, Recall, and F1-score.

License

This model is available under the MIT License.