Skip to content

Deepika14145/QuickFactChecker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Logo Banner

๐Ÿš€ 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.

๐ŸŒ Vision

Build a more informed internet by making factโ€‘checking fast, accessible, and trustworthy for everyone.

๐ŸŽฏ Mission

  • โšก Speed: deliver quick, reliable fakeโ€‘vsโ€‘real assessments
  • ๐Ÿ”Ž Clarity: present results with confidence and clear cues
  • ๐Ÿง  Learning: support multiple models and continuous improvement
  • ๐ŸŒ Access: keep the app simple to use across devices

๐Ÿค” Why QuickFactChecker?

  • ๐Ÿงญ Oneโ€‘place check: paste text or URL and get a verdict fast
  • ๐Ÿงฎ Multiple models: Naive Bayes, Logistic Regression, Random Forest, LSTM
  • ๐Ÿ“Š Transparent output: result + confidence to judge reliability

๐Ÿงญ Project Flowchart

flowchart TD
   A[User input: Text or URL] --> B[Fetch & preprocess]
   B --> C[Language/i18n setup]
   C --> D[Tokenize, normalize, clean]
   D --> E[Feature extraction: TF-IDF / Embeddings]
   E --> F{Model selected}
   F --> F1[Naive Bayes]
   F --> F2[Logistic Regression]
   F --> F3[Random Forest]
   F --> F4[LSTM]
   F1 --> G[Prediction: Real / Fake]
   F2 --> G
   F3 --> G
   F4 --> G
   G --> H[Confidence / metrics]
   H --> I[Display result in UI]
Loading

๐ŸŒŸGSSoC

๐ŸŒŸ 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

QuickFactChecker/
โ”œโ”€โ”€ .github/                              # GitHub-related configurations
โ”‚   โ”œโ”€โ”€ ISSUE_TEMPLATE/                   # Templates for creating GitHub issues
โ”‚   โ”œโ”€โ”€ workflows/                        # GitHub Actions workflows (CI/CD automation)
โ”‚   โ””โ”€โ”€ pull_request_template.md          # Template for new pull requests
โ”‚
โ”œโ”€โ”€ .venv/                                # Virtual environment for Python dependencies
โ”‚   โ””โ”€โ”€ Lib/site-packages/                # Installed Python packages
โ”‚
โ”œโ”€โ”€ Public/                               # Public assets (frontend files)
โ”‚   โ”œโ”€โ”€ css/                              # Stylesheets
โ”‚   โ”œโ”€โ”€ js/                               # JavaScript files
โ”‚   โ”œโ”€โ”€ locales/                          # Language translation files (i18n support)
โ”‚   โ”œโ”€โ”€ index.html                        # Main HTML file
โ”‚   โ”œโ”€โ”€ index_i18n.html                   # Multilingual HTML file
โ”‚   โ”œโ”€โ”€ script.js                         # Main frontend script
โ”‚   โ””โ”€โ”€ style.css                         # Main stylesheet
โ”‚
โ”œโ”€โ”€ app.py                                # Flask application entry point
โ”œโ”€โ”€ install_i18n.py                       # Script to set up internationalization (i18n)
โ”‚
โ”œโ”€โ”€ module/                               # Custom Python modules
โ”‚
โ”œโ”€โ”€ dataset/                              # Datasets and analysis notebooks
โ”‚   โ”œโ”€โ”€ liar/                             # LIAR dataset folder
โ”‚   โ”œโ”€โ”€ dataset.ipynb                     # General dataset exploration notebook
โ”‚   โ”œโ”€โ”€ fake-news-detection-ml-comparison.ipynb  # Comparison of ML models
โ”‚   โ”œโ”€โ”€ fake-news-detection-using-lr.ipynb       # Logistic Regression implementation
โ”‚   โ”œโ”€โ”€ fake-news-detection-using-lstm.ipynb     # LSTM model notebook
โ”‚   โ”œโ”€โ”€ fake-news-detection-using-nb.ipynb       # Naive Bayes model notebook
โ”‚   โ”œโ”€โ”€ fake-news-detection-using-svm.ipynb      # SVM model notebook
โ”‚   โ”œโ”€โ”€ fake-news-detection-using-xgboost.ipynb  # XGBoost model notebook
โ”‚   โ””โ”€โ”€ liar-data-analysis.ipynb                 # Data analysis for LIAR dataset
โ”‚
โ”œโ”€โ”€ results/                             # Folder for storing results, graphs, and metrics
โ”‚
โ”œโ”€โ”€ scripts/                             # Additional scripts used in the project
โ”‚
โ”œโ”€โ”€ tests/                               # Unit and integration tests
โ”‚   โ”œโ”€โ”€ test_app.py                      # Tests for main app
โ”‚   โ”œโ”€โ”€ tests_app.py                     # Additional test scripts
โ”‚   โ””โ”€โ”€ tests_dummy.py                   # Dummy test file
โ”‚
โ”œโ”€โ”€ utils/                               # Utility modules
โ”‚   โ””โ”€โ”€ fetch_url.py                     # Helper function to fetch and preprocess URLs
โ”‚
โ”œโ”€โ”€ CODE_OF_CONDUCT.md                   # Community guidelines
โ”œโ”€โ”€ CONTRIBUTING.md                      # Contribution guidelines
โ”œโ”€โ”€ LICENSE                              # License information
โ”œโ”€โ”€ LOGO.svg                             # Project logo
โ”œโ”€โ”€ GSSoC.png                            # GSSoC banner image
โ”œโ”€โ”€ MULTILINGUAL_SUPPORT.md              # Guide for adding multiple language support
โ”œโ”€โ”€ Readme.md                            # Main project documentation
โ”œโ”€โ”€ debug.log                            # Debugging log file
โ”œโ”€โ”€ .env                                 # Environment variables
โ”œโ”€โ”€ .gitignore                           # Files to be ignored by Git
โ”œโ”€โ”€ .gitattributes                       # Git configuration for line endings
โ”œโ”€โ”€ .coverage                            # Code coverage report
โ””โ”€โ”€ files.txt                            # Miscellaneous file list

โš™๏ธ 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

๏ฟฝ๏ธ Troubleshooting

  • โ›” NLTK resource errors: run python scripts/setup_nltk.py again; check internet connection
  • ๐Ÿ“ฆ Import errors: ensure virtualenv is active and pip install -r requirements.txt ran without errors
  • ๐ŸŒ CORS or fetch failures for URLs: verify the target site is reachable; try plain text input
  • ๐Ÿงช Notebook issues: update Jupyter and restart kernel; ensure correct interpreter (venv)
  • ๐Ÿ”Œ Port in use: stop prior app instance or use a different port

๐Ÿ“Š 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

Contributors 22