Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wiseaidev/truth-guard
Analyzing a 79k Dataset of Misinformation and Fake News
https://github.com/wiseaidev/truth-guard
data-analysis fastapi lstm machine-learning python supervised-learning
Last synced: about 1 month ago
JSON representation
Analyzing a 79k Dataset of Misinformation and Fake News
- Host: GitHub
- URL: https://github.com/wiseaidev/truth-guard
- Owner: wiseaidev
- License: apache-2.0
- Created: 2023-04-03T02:12:01.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-12-02T22:21:51.000Z (about 2 months ago)
- Last Synced: 2024-12-02T23:25:26.179Z (about 2 months ago)
- Topics: data-analysis, fastapi, lstm, machine-learning, python, supervised-learning
- Language: Jupyter Notebook
- Homepage:
- Size: 4.82 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Truth Guard
[![linting: pylint](https://img.shields.io/badge/linting-pylint-yellowgreen)](https://github.com/PyCQA/pylint)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![Static typing: mypy](http://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
![Codeql](https://github.com/github/docs/actions/workflows/codeql.yml/badge.svg)![banner](./assets/banner.png)
banner.png
A Fully Async-based ML Fake news detection API.
## NoteBook
- Download [GoogleNews-vectors-negative300.bin.gz](https://drive.google.com/u/0/uc?id=0B7XkCwpI5KDYNlNUTTlSS21pQmM) for the **LSTM** model and move it into the `notebook` directory.
- Download [the dataset from kaggle](https://www.kaggle.com/datasets/stevenpeutz/misinformation-fake-news-text-dataset-79k?resource=download) and move it into the `notebook/data-set` directory.
- Train and serialize the model.## Development Requirements
- Make (GNU command)
- Python (>= 3.9)
- Poetry (1.2)## Project Structure
❯ tree app
```sh
.
├── model # Package contains different config files for the `model` app.
│ ├── crud.py # Module contains different CRUD operations performed on the database.
│ ├── models.py # Module contains different data models for ODM to interact with database.
│ ├── router.py # Module contains different routes for this api.
│ └── schemas.py # Module contains different schemas for this api for validation purposes.
├── config.py # Module contains the main configuration settings for project.
├── __init__.py
├── main.py # Startup script. Starts uvicorn.
└── py.typed # mypy related file.
```## Installation with Make
Having `make` installed and configured on your machine, you can now run `make` under the root directory of this project to explore different available commands to run:
```sh
makePlease use 'make ' where is one of:
venv Create a virtual environment
install Install the package and all required core dependencies
run Running the app locally
deploy-deta Deploy the app on a Deta Micro
clean Remove all build, test, coverage and Python artifacts
lint Check style with pre-commit
test Run tests quickly with pytest
test-all Run tests on every Python version with tox
coverage Check code coverage quickly with the default Python
build Build docker containers services
up Spin up the containers
down Stop all running containers
```### 1. Create a virtualenv
```sh
make venv
```### 2. Activate the virtualenv
```sh
source .venv/bin/activate
```### 3. Install dependencies
```sh
make install
```**Note**: _This command will automatically generate a `.env` file from `.env.example`, uninstall the old version of poetry on your machine, then install latest version `1.2.2`, and install the required main dependencies._
### 4. Run The Project Locally
```sh
make run
```**Note**: _You have to set **DEBUG=info** to access the docs._
## Access Swagger Documentation
>
## Access Redocs Documentation
>
## License
This project and the accompanying materials are made available under the terms and conditions of the [` Apache License Version 2.0`](https://github.com/wiseaidev/truth-guard/blob/main/LICENSE).