A machine learning web application to predict the Fire Weather Index (FWI) based on meteorological data from two regions in Algeria.
This project is a web-based tool that uses a machine learning model to predict the likelihood of forest fires. It provides a user-friendly interface to input weather conditions and receive a real-time prediction of the Fire Weather Index (FWI), a key indicator of fire risk.
The application is built with a Flask backend to serve a Ridge Regression model and a clean, responsive HTML/CSS front-end for user interaction.
The prediction model was trained on the Algerian Forest Fires Dataset from the UCI Machine Learning Repository.
- Location: The data was collected from two regions in Algeria: the Bejaia region and the Sidi Bel-Abbes region.
- Time Period: The dataset covers the fire season from June 2012 to September 2012.
- Features: It includes daily meteorological observations such as:
- Temperature
- Relative Humidity (RH)
- Wind Speed (Ws)
- Rain
- And various components of the Canadian Forest Fire Weather Index (FWI) System (FFMC, DMC, ISI).
- Target: The model is trained to predict the Fire Weather Index (FWI), which is a numerical rating of fire intensity.
- Interactive Prediction Form: Users can easily input values for temperature, humidity, wind speed, and other factors.
- Real-time Predictions: The backend model processes the inputs and instantly returns the predicted FWI value.
- Responsive Design: The user interface is designed to work seamlessly on both desktop and mobile devices.
- Two Algerian Regions: The model accounts for data from both the Bejaia and Sidi-Bel Abbes regions.
- Backend: Python, Flask
- Machine Learning: Scikit-learn, Pandas, NumPy
- Frontend: HTML, CSS
- Deployment: Render, Gunicorn
To set up and run this project on your local machine, follow these steps:
-
Clone the repository:
git clone <your-repository-url> cd <your-repository-directory>
-
Create a virtual environment:
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the dependencies:
pip install -r requirements.txt
-
Run the application:
python application.py
-
Open your web browser and go to
http://127.0.0.1:8080.
This application is deployed on Render using a Procfile to run a Gunicorn web server. Continuous deployment is set up to automatically update the live application whenever new changes are pushed to the main branch on GitHub.
- This project uses the Algerian Forest Fires Dataset from the UCI Machine Learning Repository.