Skip to content

Classification of Disaster related tweets from Social Media using BERT Model

Notifications You must be signed in to change notification settings

hiteshmeta85/ml-mini-project-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Classification of Disaster related tweets from Social Media using BERT Model

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published