NajmiHassan1/Air_Pollution_Prediction_System
2
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
๐ Air Pollution Prediction System
A machine learning-based web application that predicts PM2.5 levels and air quality using environmental and demographic factors.
๐ Overview
This system uses trained regression and classification models to predict:
- PM2.5 Concentration (ยตg/mยณ) - Fine particulate matter levels
- Air Quality Level - Classification into Good, Moderate, Poor, or Hazardous
๐ฏ Features
- Real-time air quality predictions
- User-friendly web interface built with Streamlit
- Dual prediction capabilities (PM2.5 levels and quality classification)
- Interactive input controls with validation
- Color-coded results with health recommendations
๐ Dataset Information
Source: Air Quality and Pollution Assessment Dataset
- Size: 5,000 samples
- Features: 8 environmental and demographic variables
- Target: Air quality levels (Good, Moderate, Poor, Hazardous)
Input Parameters:
- Temperature (ยฐC): Average regional temperature
- Humidity (%): Relative humidity
- PM10 (ยตg/mยณ): Coarse particulate matter
- NO2 (ppb): Nitrogen dioxide levels
- SO2 (ppb): Sulfur dioxide levels
- CO (ppm): Carbon monoxide levels
- Industrial Proximity (km): Distance to nearest industrial zone
- Population Density (people/kmยฒ): Regional population density
๐ Quick Start
Prerequisites
pip install streamlit numpy pandas pickleFile Structure
air-pollution-predictor/
โโโ app.py # Streamlit web interface
โโโ air_pollution_predictor.py # Main prediction logic
โโโ regression_model.pkl # Trained PM2.5 prediction model
โโโ classification_model.pkl # Trained air quality classification model
โโโ README.md๐ฎ How to Use
- Enter Environmental Data: Input temperature, humidity, and pollutant levels
- Set Location Factors: Specify industrial proximity and population density
- Get Predictions: Choose to predict PM2.5 levels, air quality, or both
- View Results: See color-coded predictions with health recommendations
๐ฅ Air Quality Standards
- ๐ข Good: Safe air quality with minimal health impact
- ๐ก Moderate: Acceptable for most people
- ๐ Poor: May affect sensitive individuals
- ๐ด Hazardous: Health risk for everyone
๐ง Technical Details
- Framework: Streamlit for web interface
- Models: Scikit-learn based regression and classification
- Input Validation: Built-in range checking and error handling
- Caching: Optimized model loading for better performance
๐ Project Structure
air_pollution_predictor.py: Core prediction logic and model handlingapp.py: Streamlit web application interface- Model files: Pre-trained pickle files for predictions
