Logo Lanfrica

AnonymousMaaz/algerian-fwi-predictor

Domain:

environment and energyclimate

Record type:

software
Creator:
Ano
Host:
Machine learning web app to predict the Fire Weather Index (FWI) for Algerian forest fire datasets β€” built with Flask, Ridge/Lasso/ElasticNet/Linear regression models, and a fire-themed UI. # πŸ”₯ FWI Predictor Machine-learning powered Fire Weather Index (FWI) prediction web app built with Flask. ## Project Structure ``` fwi_app/ β”œβ”€β”€ app.py # Flask application β”œβ”€β”€ wsgi.py # Gunicorn entry point β”œβ”€β”€ requirements.txt # Python dependencies β”œβ”€β”€ Procfile # Heroku / Railway / Render β”œβ”€β”€ Models/ β”‚ β”œβ”€β”€ ridge_model.pkl # Trained Ridge Regression model β”‚ └── scaler.pkl # Fitted StandardScaler └── templates/ β”œβ”€β”€ index.html # Landing page └── home.html # Prediction form + results ``` ## Run Locally ```bash pip install -r requirements.txt python app.py # β†’ localhost ``` ## Deploy ### Render (free tier) 1. Push to GitHub 2. New Web Service β†’ connect repo 3. Build: `pip install -r requirements.txt` 4. Start: `gunicorn wsgi:application` ### Railway ```bash railway init railway up ``` ### Heroku ```bash heroku create fwi-predictor git push heroku main ``` ## REST API POST `/api/predict` with JSON body: ```json { "Temperature": 29, "RH": 57, "Ws": 18, "Rain": 0, "FFMC": 85.9, "DMC": 26.2, "ISI": 5.1, "Classes": 0, "Region": 0 } ``` Response: ```json { "fwi": 42.15, "risk_level": "High", "description": "High fire potential. Avoid outdoor burning." } ``` ## FWI Risk Levels | FWI Range | Level | |-----------|-----------| | < 15 | Low | | 15 – 29 | Moderate | | 30 – 44 | High | | 45 – 64 | Very High | | β‰₯ 65 | Extreme |