ClearSky AI — Real-Time Air Quality Monitoring and Next-Day AQI Prediction for Indian Cities
Back to ProjectUnzip the downloaded project and open a terminal inside the extracted directory.
cd ClearSky-AI-AQI-Prediction
python -m venv venv
Activate it:
# macOS / Linux
source venv/bin/activate
# Windows
venv\Scripts\activate
pip install -r requirements.txt
This installs Flask, XGBoost, scikit-learn, pandas, NumPy, joblib, and everything else the project needs.
Open app.py in any text editor. Near the top of the file, replace the placeholder value:
WAQI_TOKEN = "your_token_here"
Get a free token by signing up at the World Air Quality Index project website (waqi.info/api/).
The three model artifact files — aqi_model.pkl, scaler.pkl, and feature_names.pkl — are generated by the Jupyter Notebook and must exist before the Flask app starts. If they are not already present in the project root, run:
pip install jupyter
jupyter notebook AQI_Prediction.ipynb
Inside Jupyter, go to the Kernel menu and click Restart and Run All. Wait for all ten cells to complete. The three .pkl files will appear in the project root once the notebook finishes.
python app.py
You should see output similar to:
* Running on http://127.0.0.1:5001
* [startup] Model loaded. Features: ['PM2.5', 'PM10', ...]
The SQLite database file (aqi_history.db) is created automatically on the first run.
AQI_Prediction.ipynb first.
lsof -i :5001 on Mac/Linux to find the process ID, then kill -9 <PID>. On Windows, use Task Manager to end the conflicting process.
geo:12.97;77.59 for Bangalore.
Our team is here to assist you with installation and setup.