π Binary Classification of Fake and Real News using Transformer Models
This project uses a DistilBERT transformer model to classify news articles as real or fake. The dataset is sourced from Kaggle and consists of labeled news articles. The model achieves high accuracy in detecting misinformation.
- Source: Fake and Real News Dataset
- Structure:
True.csvβ Real news articlesFake.csvβ Fake news articles
- Preprocessing:
- Combined
titleandtextcolumns for better context. - Added labels (
1= Real,0= Fake). - Tokenized text using DistilBERT Tokenizer.
- Combined
Clone this repository and install dependencies:
git clone https://github.com/your_username/fake-news-detection.git
Open Powershell in windows and run:
pip install -r "path/to/requirements.txt"