INNER CODE UNIT · Python
final_aqi
Niketkumardheeryan/ML-CaPsule · Air_quality_prediction/app.py:154
final_aqi = nn_pred + lgb_pred
# 7. Post-Processing
if final_aqi > 498.5:
final_aqi = 500.0
final_aqi = np.clip(final_aqi, 25.0, 500.0)
# --- 5. UI RESULTS ---
st.markdown("---")
if final_aqi <= 50:
color, status = "green", "Good"
elif final_aqi <= 100:
color, status = "green", "Satisfactory"
elif final_aqi <= 200:
color, status = "orange", "Moderate"
elif final_aqi <= 300:
color, status = "red", "Poor"