Downloads · 30 days
8
10% of all-time downloads
bamaiyi1/fake-news-detector-model
fake-news-detector-model is a machine learning model from bamaiyi1. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
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 vari…
Downloads · 30 days
8
10% of all-time downloads
All-time downloads
81
Public
Repo size
473 MB
Likes
0
Public
Click a slice to open those files.
.bin17.6 MB · 96%
From the Hugging Face model README
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.
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
Clone the repository:
git clone <repository-url>
cd fake-news-streamlit
Create a virtual environment (optional but recommended):
python -m venv venv
source venv/bin/activate # On Windows use `venv\Scripts\activate`
Install dependencies:
pip install -r requirements.txt
Set up environment variables:
Copy .env.example to .env and fill in the required values.
Run the application:
streamlit run app.py
Contributions are welcome! Please open an issue or submit a pull request for any enhancements or bug fixes.
This project is licensed under the MIT License. See the LICENSE file for more details.