A simple app that predicts the Fire Weather Index (FWI) using an Algerian dataset. It applies Standard Scaler for preprocessing and Ridge Regression for prediction, helping with early fire risk assessment based on weather data.
# π₯ Fire Weather Index (FWI) Prediction App
A lightweight Flask web application that predicts the **Fire Weather Index (FWI)** using a Ridge Regression model trained on Algerian forest fire data. Built with a clean, responsive UI using Bootstrap 5.
---
## π Features
- π’ Predicts FWI from user inputs:
- Temperature (Β°C)
- Relative Humidity (%)
- Wind Speed (m/s)
- Rainfall (mm)
- FFMC (Fine Fuel Moisture Code)
- DMC (Duff Moisture Code)
- ISI (Initial Spread Index)
- Classes (numeric category)
- Region (numeric category)
- βοΈ Preprocessing with Standard Scaler
- π Ridge Regression model for predictions
- π‘ Clear and responsive UI with Bootstrap 5
- π‘οΈ Basic input validation and error handling
---
## π οΈ Installation & Setup
1. **Clone the repository**:
```bash
git
github.com
cd fwi-prediction-app
```
2. **(Optional) Create a virtual environment**:
```bash
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
```
3. **Install dependencies**:
```bash
pip install -r requirements.txt
```
4. **Ensure model files are present**:
- Place `ridge.pkl` and `scaler.pkl` inside the `models/` directory.
---
## βΆοΈ Running the App
Start the Flask development server:
```bash
python app.py
```
Then, open your browser and go to:
```
127.0.0.1
```
Enter your weather data and click **"Predict FWI"**.
---
## π§ Project Structure
```
.
βββ application.py # Flask application
βββ models/
β βββ ridge.pkl # Trained Ridge Regression model
β βββ scaler.pkl # Trained Standard Scaler
βββ templates/
β βββ index.html
β βββ home.html
# Frontend HTML with Bootstrap
βββ requirements.txt # Project dependencies
βββ README.md # Project documentation
```
---
## π§ͺ Sample Input (for testing)
| Feature | Value |
|---------------------|---------|
| Temperature (Β°C) | 25 |
| Relative H β¦