This project classifies disaster-related messages into relevant categories to assist in emergency response. Follow the steps below to set up, train the model, and deploy a Streamlit web application for inference.
git clone https://github.com/sadavaidya/Disaster_classifier.git
cd Disaster_classifier
Ensure you have Conda installed. Then, create and activate the virtual environment:
conda create --name disaster_classifier python=3.8
conda activate disaster_classifier
Install the necessary dependencies:
pip install -r requirements.txt
Execute the pipeline script to process data and train the model:
python src/pipeline.py
This step will generate the trained model and save it in the models
directory.
To deploy the model using Streamlit:
-
Ensure the trained model (
classifier.pkl
) is available in themodels
directory. -
Run the Streamlit app:
streamlit run app.py
This command will launch a web interface where users can enter a message and receive a classification. 3. Sample screenshot of how streamlit app will look, can be found in the repository as demp_streamlit_app.png
- The Streamlit app (
app.py
) is included in this repository. - Modify
app.py
as needed to customize the UI or enhance functionality. - Ensure all dependencies are installed before running the app.