YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

Fake News Detection Project

Overview

This project is a Fake News Detection application built using Streamlit and TensorFlow. It leverages a pre-trained BERT model to classify news articles as real or fake. The application fetches real-life news from various sources, processes the data, and provides users with an intuitive interface to analyze the credibility of news headlines.

Project Structure

fake-news-streamlit
β”œβ”€β”€ app.py                   # Main entry point of the Streamlit application
β”œβ”€β”€ src                      # Source code for the application
β”‚   β”œβ”€β”€ news_fetcher.py      # Functions to fetch real-life news
β”‚   β”œβ”€β”€ model_loader.py      # Loads the pre-trained machine learning model
β”‚   β”œβ”€β”€ predictor.py         # Prediction logic for classifying news
β”‚   β”œβ”€β”€ preprocess.py        # Preprocessing functions for fetched news data
β”‚   β”œβ”€β”€ visualizer.py        # Visualization of prediction results
β”‚   └── utils.py             # Utility functions used across the application
β”œβ”€β”€ models                   # Directory for model documentation
β”‚   └── README.md            # Documentation about the models used
β”œβ”€β”€ notebooks                # Jupyter notebooks for exploration
β”‚   └── exploration.ipynb    # Notebook for exploratory data analysis
β”œβ”€β”€ tests                    # Unit tests for the application
β”‚   └── test_predict.py      # Tests for the prediction logic
β”œβ”€β”€ requirements.txt         # Project dependencies
β”œβ”€β”€ Dockerfile               # Instructions for building a Docker image
β”œβ”€β”€ .env.example             # Example environment variables
β”œβ”€β”€ .gitignore               # Files and directories to ignore by Git
└── README.md                # Project documentation

Setup Instructions

  1. Clone the repository:

    git clone <repository-url>
    cd fake-news-streamlit
    
  2. Create a virtual environment (optional but recommended):

    python -m venv venv
    source venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  3. Install dependencies:

    pip install -r requirements.txt
    
  4. Set up environment variables: Copy .env.example to .env and fill in the required values.

  5. Run the application:

    streamlit run app.py
    

Usage

  • The application provides a dashboard for users to input news headlines and receive predictions on their credibility.
  • Users can also upload CSV files for batch predictions.
  • The sidebar contains controls for adjusting model parameters and viewing token importance.

Contributing

Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

Downloads last month
4
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support