https://github.com/vasugi2003/news_article_classification_using_llm_bert
News Category Classification with BERT - This repository contains implementation of a BERT-based model for classifying news articles into various categories. The model is fine-tuned on a dataset of news headlines and categories.
https://github.com/vasugi2003/news_article_classification_using_llm_bert
bert-model classification colab-notebook huggingface kaggle llm
Last synced: 7 months ago
JSON representation
News Category Classification with BERT - This repository contains implementation of a BERT-based model for classifying news articles into various categories. The model is fine-tuned on a dataset of news headlines and categories.
- Host: GitHub
- URL: https://github.com/vasugi2003/news_article_classification_using_llm_bert
- Owner: Vasugi2003
- Created: 2024-08-21T08:22:17.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-08-30T13:22:50.000Z (about 1 year ago)
- Last Synced: 2025-01-11T19:44:25.770Z (9 months ago)
- Topics: bert-model, classification, colab-notebook, huggingface, kaggle, llm
- Language: Jupyter Notebook
- Homepage:
- Size: 651 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: NEWS_Classification_and_generation.ipynb
Awesome Lists containing this project
README
**News Category Classification with BERT**
This repository contains a PyTorch implementation of a BERT-based model for classifying news articles into various categories. The model is fine-tuned on a dataset of news headlines and categories and includes TPU/GPU support for efficient training.
**Objective**
The goal of this project is to build a news category classifier using the BERT (Bidirectional Encoder Representations from Transformers) model. BERT is fine-tuned on a news dataset to predict the category of a news headline.
**Dataset**
The dataset used is the "News Category Dataset" from Kaggle, which consists of various news headlines and their corresponding categories. The dataset can be downloaded using the Kaggle API.
**Key Features**
TPU/GPU Support: The code is optimized to run on TPU or GPU using TensorFlow and PyTorch.
Fine-Tuning BERT: The BERT model (bert-base-uncased) is fine-tuned on the news dataset.
Early Stopping: The model training includes an early stopping mechanism to prevent overfitting.
Evaluation: The model is evaluated on a test set with metrics including accuracy, a classification report, and a confusion matrix.
Getting Started
Prerequisites
Python 3.x
TensorFlow
PyTorch
Hugging Face Transformers
Kaggle API
Other dependencies as specified in requirements.txt