https://github.com/hiteshmeta85/ml-mini-project-api
Classification of Disaster related tweets from Social Media using BERT Model
https://github.com/hiteshmeta85/ml-mini-project-api
bert binary-classification flask machine-learning sqlite twint
Last synced: about 1 month ago
JSON representation
Classification of Disaster related tweets from Social Media using BERT Model
- Host: GitHub
- URL: https://github.com/hiteshmeta85/ml-mini-project-api
- Owner: hiteshmeta85
- Created: 2022-09-22T16:12:44.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-10-20T14:54:19.000Z (over 3 years ago)
- Last Synced: 2025-02-08T03:14:11.039Z (over 1 year ago)
- Topics: bert, binary-classification, flask, machine-learning, sqlite, twint
- Language: Jupyter Notebook
- Homepage:
- Size: 3.85 MB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ML-MINI-PROJECT-API
## Dataset
``` https://www.kaggle.com/competitions/nlp-getting-started/data?select=train.csv ```
Accuracy achieved: 80.44%
collab Notebook link Training - `https://colab.research.google.com/drive/1NoBShinYljfw_sEKyF0TEDzGdlfaZRsT?usp=sharing`
collab Notebook link Inference - `https://colab.research.google.com/drive/1ThpOIpY33l3WXFGH9QAlX0BmE67pTZNK?usp=sharing`
# Setup [Docker]
## Build Docker Image
```docker-compose up```
## Rebuild Docker Image
```docker-compose up --build```
# Setup [Local]
## Model Used - BERT UNCASED
Download and save the folder in backend/models/
Model link - ``` https://drive.google.com/file/d/1IJBNMt2pGmDxTq2e64rpzDjaz4aAauL7/view?usp=sharing ```
## Installation
- Twint installation
```
pip3 install --user --upgrade git+https://github.com/twintproject/twint.git@origin/master#egg=twint
```
- Install requirements
```
pip install -r requirement.txt
```
## Backend - FLASK
### If you want to start a new session od db
- Delete the db.sqlite file in backend folder
- Run the following commands
```
python init_db.py
```
```
cd backend
python app.py
```
---
### Sample Images
1. Select Disaster Type

2. Enter Custom Hashtags

3. Raw Data scraped from Twitter using Twint

4. Binary Classified Data using BERT Model

5. BERT model flow for Binary Classification of Text
