This repository contains code for a fake news detection system. The system uses a dataset of fake and true news articles to train a machine learning model that can classify news articles as either fake or true.
To run the code locally, please follow these steps:
- Clone the repository:
git clone https://github.com/your-username/fake-news-detection.git
- Navigate to the project directory:
cd fake-news-detection
- Install the required dependencies:
pip install -r requirements.txt
The main.py
file contains the main code for the fake news detection system. You can run it using the following command:
python main.py
This will load the dataset, preprocess the data, train the model, and evaluate its performance. The trained model can then be used to classify new news articles as fake or true.
The dataset used for training and testing the model is available in the data
directory. It consists of two CSV files: fake.csv
and true.csv
, containing fake and true news articles, respectively.
The accuracy of the trained model on the test set is 99.27%. This indicates that the model performs well in distinguishing between fake and true news articles.
Contributions to this project are welcome. If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.
This project is licensed under the MIT License. You can find more details in the LICENSE file.
Feel free to customize the content based on your specific project and add more sections or details as needed.