Skip to content

kartikkapri/QuickFactChecker

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

139 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฐ QuickFactChecker โ€“ Fake News Detection

๐Ÿš€ Live Demo

Try it now: https://quickfactchecker.onrender.com/

๐Ÿ“Œ Project Overview

QuickFactChecker is a machine learningโ€“based web app that helps detect whether a news article is real or fake. It uses different models (e.g., Naive Bayes, LSTM) trained on the LIAR dataset to evaluate credibility and assist users in identifying potentially misleading information.


๐ŸŒŸGSSoc

GSSoC Logo ๐ŸŒŸ Exciting News...

๐Ÿš€ This project is now an official part of GirlScript Summer of Code โ€“ GSSoC'25! ๐Ÿ’ป We're thrilled to welcome contributors from all over India and beyond to collaborate, build, and grow QuickFactChecker! Letโ€™s make learning and career development smarter โ€“ together! ๐ŸŒŸ

๐Ÿ‘ฉโ€๐Ÿ’ป GSSoC is one of Indiaโ€™s largest 3-month-long open-source programs that encourages developers of all levels to contribute to real-world projects ๐ŸŒ while learning, collaborating, and growing together. ๐ŸŒฑ

๐ŸŒˆ With mentorship, community support, and collaborative coding, it's the perfect platform for developers to:

  • โœจ Improve their skills
  • ๐Ÿค Contribute to impactful projects
  • ๐Ÿ† Get recognized for their work
  • ๐Ÿ“œ Receive certificates and swag!

๐ŸŽ‰ I canโ€™t wait to welcome new contributors from GSSoC 2025 to this QuickFactChecker project family! Let's build, learn, and grow together โ€” one commit at a time. ๐Ÿ”ฅ


โœจ Features

  • โœ… Fake news classification using ML models (Naive Bayes, Logistic Regression, Random Forest, and LSTM).
  • โœ… Interactive web app built with Flask and HTML templates.
  • โœ… Automated NLTK Setup to prevent missing resource errors.
  • โœ… Preprocessed dataset included (train.tsv, test.tsv, valid.tsv).
  • โœ… Notebooks for data analysis & experimentation (liar-data-analysis.ipynb, dataset.ipynb).
  • โœ… Easy setup with requirements.txt.

๐Ÿ“‚ Project Structure

dataset/liar
ย  ย โ”œโ”€โ”€ README.md ย  ##Dataset description
ย  ย โ”œโ”€โ”€ train.tsv ย  ##Training data
ย  ย โ”œโ”€โ”€ test.tsv ย  ย ##Testing data
ย  ย โ”œโ”€โ”€ valid.tsv ย  ##Validation data

module/
ย  ย โ”œโ”€โ”€ dataset.ipynb
ย  ย โ”œโ”€โ”€ fake-news-detection-using-lstm.ipynb
ย  ย โ”œโ”€โ”€ fake-news-detection-using-nb.ipynb
ย  ย โ”œโ”€โ”€ liar-data-analysis.ipynb

templates/
ย  ย โ”œโ”€โ”€ index.html

scripts/
ย  ย โ”œโ”€โ”€ setup_nltk.py          
ย  ย โ””โ”€โ”€ fake_news_logreg_rf.py ย  ย  ## Train & evaluate Naive Bayes, Logistic Regression, Random Forest
results/
ย  ย โ”œโ”€โ”€ model_comparison.md ย  ย  ย  ย ## Generated baseline comparison table (markdown)
ย  ย โ””โ”€โ”€ comparison.png ย  ย  ย  ย  ย  ย  ## Generated accuracy bar chart

.gitattributes
app.py
hero_img.svg
LICENSE
Readme.md
requirements.txt

โš™๏ธ Installation & Setup

  1. Clone the repository and navigate into it:

    git clone https://github.com/Deepika14145/QuickFactChecker.git
    cd QuickFactChecker
  2. Create virtual environment (optional but recommended)

       python -m venv venv
  3. Activate the virtual environment:

       source venv/bin/activate   # for Linux/Mac
       venv\Scripts\activate      # for Windows
  4. Install the required dependencies:

    pip install -r requirements.txt
  5. Download NLTK Corpora:

python scripts/setup_nltk.py

๐Ÿ“Š Baseline Model Comparison

We evaluated three models on the LIAR dataset using TF-IDF features. Example results (accuracy & precision): example:

Model Accuracy Precision
Naive Bayes 0.XXXX 0.XXXX
Logistic Regression 0.XXXX 0.XXXX
Random Forest 0.XXXX 0.XXXX

Logistic Regression achieved the highest accuracy among the tested baselines.

๐Ÿ”ง Run the comparison script

To reproduce these results, run:

scripts/fake_news_logreg_rf.py

โ–ถ๏ธ Usage

  1. Run the following command to start the application:

    python app.py
  2. The app will provide predictions on whether a news article is real or fake based on the input.

๐Ÿ› ๏ธ Model Training

To retrain or experiment with the models, run the provided Jupyter notebooks. Ensure your virtual environment is activated and all dependencies are installed.

Naive Bayes

Run the notebook:

jupyter notebook fake-news-detection-using-nb.ipynb

LSTM

Run the notebook:

jupyter notebook fake-news-detection-using-lstm.ipynb

Dataset Analysis

jupyter notebook liar-data-analysis.ipynb

๐Ÿค Contributing

Contributions are welcome! Whether youโ€™re fixing typos, improving docs, or adding new features โ€” every PR helps. Follow these steps:

  1. Fork the repository
  2. Create a new branch (git checkout -b feature-name)
  3. Make your changes
  4. Commit your changes (git commit -m 'description of your feature/fix')
  5. Push to the branch (git push origin feature-name)
  6. Create a Pull Request

Please read CONTRIBUTING.md and follow our Code of Conduct.

๐Ÿ“ฆ Deployment

The application is deployed on Render and accessible at: https://quickfactchecker.onrender.com/

Deployment Features:

  • โœ… Free hosting on Render
  • โœ… Auto-deployment from GitHub commits
  • โœ… Production-ready with Gunicorn server
  • โœ… HTTPS enabled by default
  • โœ… Optimized requirements for faster build times

Technical Stack:

  • Backend: Flask (Python)
  • Server: Gunicorn
  • Platform: Render
  • CI/CD: GitHub integration

๐Ÿ“ง Contact

For queries, feedback, or guidance regarding this project, you can contact the mentor assigned to the issue:

  • ๐Ÿ“ฉ GitHub (Owner): Deepika14145
  • ๐Ÿ’ฌ By commit/PR comments: Please tag the mentor in your commit or pull request discussion for direct feedback.

Original Repository: QuickFactChecker

Contributor

A heartfelt thank you to all the contributors who have dedicated their time and effort to make this project a success.
Your contributionsโ€”whether itโ€™s code, design, testing, or documentationโ€”are truly appreciated! ๐Ÿš€

Thanks to all the wonderful contributors ๐Ÿ’–

See full list of contribution from contributor Contributor Graph

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


If you find this project useful, please give it a โญ๏ธ! Your support is appreciated!

Feel free to contribute or suggest new features!๐Ÿ™

About

Resources

License

Code of conduct

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 63.1%
  • Jupyter Notebook 35.9%
  • JavaScript 0.3%
  • CSS 0.3%
  • HTML 0.2%
  • PowerShell 0.1%
  • Other 0.1%