Inspiration

Haze from forest and peatland fires drifts across Southeast Asia most years. When Singapore's PSI climbs past 100, everyone asks the same three questions: Is the air bad where I am? What should someone like me do about it? When is it safe to go out? Official sites give the number, but not what it means for a parent, a runner or someone with asthma. We wanted an app that answers all three, in plain language, the moment the air changes.

What it does

PHAZE tracks haze around the world and tells you when the air near you leaves the healthy range.

  • Now: the sky over your chosen place is drawn from live air quality. Clean air is a clear blue sky. As readings rise, the sky turns hazy, the sun becomes a flat orange disc holding the reading, and the skyline fades. Below it, PHAZE gives plain advice for today (exercise, commuting, windows, kids playing outside), tailored to who it's for, plus Singapore's PSI by region and forecast trends for every place you watch.
  • Alerts: pick any city on Earth and your own limit. PHAZE alerts you in the app or on your phone through Telegram, once per haze episode rather than every few minutes.
  • Plan: a 48-hour forecast, hour by hour. PHAZE finds the clearest times for your plans.
  • News: web search with sources, explaining what's causing the haze and what happens next.
  • Ask: questions like "Should I take my kids to the park on Saturday?", answered using today's readings.
  • How it works: every model call, with tokens, speed, cost, and how the work was split between models.

How we built it

PHAZE is a Python and Streamlit app running entirely on NVIDIA Nemotron 3 open models served by Nebius Token Factory, through its OpenAI-compatible API.

We route each job to the smallest model that can do it well:

Job Model Why
Writing alerts Nemotron 3 Nano Runs on every alert, so it must be fast and cheap
Routing questions Nemotron 3 Nano A small job: is this easy or hard, and does it need fresh news?
Easy questions Nemotron 3 Nano Definitions don't need a big model
Hard questions and outdoor planning Nemotron 3 Super Multi-step reasoning over a 48-hour forecast
Haze news Nemotron 3 Super + Tavily Reading several articles and citing them accurately

Most calls go to Nano, so the app stays responsive and credits last longer.

Grounded by design: the models never make up readings. Health bands, clean-air windows and peaks are calculated in Python from official data (NEA's PSI via data.gov.sg, and Copernicus CAMS forecasts via Open-Meteo), then given to Nemotron to explain. Every AI feature also has a rule-based fallback, so the app keeps working if a call fails.

A background notifier sends Telegram alerts even when the app is closed. It can run on GitHub Actions or as a Nebius Serverless Job.

Challenges we ran into

  • Two different scales. Singapore uses PSI and most of the world uses US AQI. Both treat 100 as the healthy limit, but they're calculated differently. We gave both a shared 0 to 5 severity level, so the advice and visuals stay consistent without pretending the numbers are the same.
  • Not spamming people. Checking every few minutes could fire the same alert over and over. We alert once per episode, and again only if the air gets a level worse or stays bad past a cooldown.
  • Streamlit limits. Inline SVG gets stripped from custom HTML, so we drew the skyline and sparklines as embedded images. A time-axis setting silently blanked our forecast chart until we tracked it down.
  • Keeping AI honest. Getting reliable, short, structured output meant tight prompts, JSON parsing with fallbacks, and never letting the model supply numbers. ## Accomplishments that we're proud of
  • The sky: one look tells you how bad the air is, without reading a number.
  • Clear model routing, with live stats showing how much work Nano handles.
  • Advice tailored to elderly people, children and people with asthma, based on NEA and US EPA guidance.
  • Works on phones, uses fonts chosen for legibility (Atkinson Hyperlegible Next, made for low-vision readers), and has 27 offline tests.

What we learned

  • Using a small model for frequent jobs and a large one for reasoning makes a real difference to speed and cost.
  • AI is most trustworthy when it explains data rather than producing it.
  • Good design for a health app means plain words first, numbers second.

What's next for PHAZE

  • Push notifications in a mobile app, alongside Telegram.
  • Hotspot and wind data to warn people before haze arrives.
  • More languages for the region, starting with Malay, Chinese and Bahasa Indonesia.
  • Fine-tuning Nemotron on NEA and WHO health advisories.

Built With

  • altair
  • copernicus-cams
  • github-actions
  • nebius-token-factory
  • nemotron-3-nano
  • nemotron-3-super
  • nvidia-nemotron
  • open-meteo
  • openai-api
  • pandas
  • pydeck
  • python
  • streamlit
  • tavily
Share this project:

Updates

Submission history