Skip to content

in-balamurugan/Disaster-Message-Classification-App

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disaster Response Pipeline Project

A Flask Web app to classify texts from disaster response times into a 36 fixed set of categories.Dataset is used from Figure 8.Project is part of Udacity Data Scientist nanodegree program.In disaster time, this app will help categorize disaster messages so that you can send the messages to an appropriate disaster relief agency. An emergency worker can input a new message in this web app and get classification results in several categories.The web app will also display visualizations of the data.

Table of Contents

  1. Folders
  2. Dependecies
  3. Instructions
  4. Web App Screen shots
  5. Metrics

Folders:

--  app
|      -- templates
|          -- master.html # main page of web app
|          -- go.html # classification result page of web app
|-- run.py # Flask file that runs app
|--data
|      -- disaster_categories.csv # data to process
|      -- disaster_messages.csv # data to process
|      -- process_data.py
|      -- DisasterResponse.db # database to save clean data
|--models
|      -- train_classifier.py
|      -- classifier.pkl # saved model
|      -- X_test.csv #test data set
|      -- Y_prediction.csv # predicted class
|      -- Y_test.csv # actual class
|--screen_shots
--  README.md
--  Requirements.txt

Package Dependecies:

  • nltk
  • flask
  • sqlalchemy
  • sklearn
  • joblib
  • icecream
  • pandas

Instructions:

  1. Run the following commands in the project's root directory to set up your database and model.

To run ETL pipeline that cleans data and store in database
python data/process_data.py data/disaster_messages.csv data/disaster_categories.csv data/DisasterResponse.db

To run ML pipeline that trains classifier and save
python models/train_classifier.py data/DisasterResponse.db models/classifier.pkl

  1. Run the following command in the app's directory to run your web app. python app/run.py

  2. Go to https://0.0.0.0:3001/

Web App Screen shots:

Welcome screen

welcome

Charts
enter message enter message enter message


Classification results page
results

Metrics:

  • Execution time: 48 minutes for classifier
  • precision: 0.8868079851821362
  • recall: 0.8376749611197511
  • f1: 0.6628273389112246

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published