A simple Streamlit app that predicts disaster types from images using a convolutional neural network.
This project loads a pre-trained TensorFlow model (model.h5) and runs a web interface using Streamlit. The app classifies uploaded images into one of four disaster categories:
- Cyclone
- Earthquake
- Flood
- Wildfire
The model was trained using a Kaggle dataset for disaster image classification.
main.py- Streamlit application that loads the model and performs prediction on uploaded images.model.h5- Primary trained TensorFlow model used by the app.disastercnn.ipynb- Jupyter notebook for experimentation, exploration, or model training.
- Python 3.8+
- TensorFlow
- Streamlit
- Pillow
- NumPy
pip install tensorflow streamlit pillow numpyFrom the project directory:
streamlit run main.pyThen open the local URL shown in the terminal.
- Open the Streamlit app.
- Upload an image of a disaster scene.
- View the predicted disaster type and confidence score.
- The app expects input images to be RGB and resizes them to
224x224pixels. - The model predictions are normalized and returned with the highest-confidence class.
Include a license or attribution if desired.