DEV Community

Cover image for Baadal: I Built an App That Teaches You to Read the Sky Again
Yuthika Singh
Yuthika Singh

Posted on

Baadal: I Built an App That Teaches You to Read the Sky Again

Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass Submission ๐ŸŒฟ

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 1: Touch Grass

The cover is a sunset I photographed from my terrace in Mumbai. When I ran it through Baadal, Gemma called it **stratocumulus: the lumpy, rolling cloud layer you can see catching the last of the light.

What I Built

Every Mumbaikar knows the umbrella gamble. You open a weather app, it says 40% chance of rain, and you're no wiser than before. So you scroll a little longer, and step out without ever looking at the one thing that actually knows: the sky right above you.

People used to read it. Fishermen read it before setting out, and farmers before sowing. So did my grandmother: she could look at the clouds over the building opposite and tell us, almost to the hour, when to rush the clothes off the line. Somewhere between her generation and mine, we swapped looking up for looking down.

I wanted to build something that hands that skill back.

Baadal (เคฌเคพเคฆเคฒ, Hindi for cloud) is a tiny web app that does one thing: you step outside, take one photo of the sky, and it tells you the chance of rain in the next 3 hours. Then it teaches you how to read that sky yourself, so that next time you won't need it.

The whole interaction takes under 30 seconds of screen time:

  1. Look up. Frame mostly sky and tap Read the sky (or upload a photo from your gallery).
  2. Gemma 4 reads the clouds. It names the cloud type (cumulus, stratus, cirrus and the rest of the 10 WMO genera), estimates how much of the sky is covered, and checks for towering growth.
  3. TabPFN does the forecasting. It combines what you saw with live humidity, pressure and the 3-hour pressure trend, and returns a rain probability.
  4. You get a sky lesson. Two sentences on why, plus one "spot it yourself next time" tip, like "If the top flattens into an anvil shape, rain is usually less than an hour away."
  5. Pocket the phone. Three hours later you tap It rained or Stayed dry, and the app keeps an honest score.

The result screen shows two bars side by side: "With your eyes" (your photo + weather data) and "Weather data only". That comparison is the heart of the project. It shows exactly what looking up adds.

The best possible outcome for Baadal is that one day you don't open it at all. You just look up, and you know.

Three skies, three readings

October is Mumbai's in-between month: the monsoon has left, and the sky changes character through the day. I gave Baadal three skies I'd photographed from my terrace, one each in the afternoon, the evening and at night:

Photo taken What Gemma saw Baadal's rain chance* What actually happened
Afternoon Cumulus 13% Rained
Evening Stratocumulus 10% Stayed dry
Night Stratus 5% Stayed dry

*I uploaded these from my gallery, so each rain chance was calculated with the live weather at the moment of upload, not the weather when the photo was taken. That makes this a test of Gemma's eyes, not a scored forecast, and I'm not counting it as one.

Gemma named a different cloud type for each sky, and the low numbers fit a dry October evening and night. The afternoon cumulus is the lesson I keep coming back to: puffy cumulus that keeps building in the afternoon heat can turn into a shower, and that afternoon it did. That is exactly the kind of sign Baadal's "spot it yourself" tips teach you to watch for, and catching it live, with that afternoon's own humidity and pressure, is the next test I'm running.

Demo

Live app: https://cloud-oracle.onrender.com (free tier, so the first load can take ~50 seconds to wake up)

1. Look up and tap once. Take a photo, upload one from your gallery, or pick the cloud yourself.

Baadal start screen

2. Give it the sky. This is the evening sky from my terrace that I gave Baadal for this reading.

An evening sky over Mumbai with low, lumpy clouds

3. The reading and the sky lesson. Gemma called it stratocumulus, 6/8 covered, 80% sure. Adding what I saw raised the rain chance from 1% (weather data only) to 10%, still low, and the lesson explains why in plain words: the clouds weren't growing tall, and the air was fairly dry at 56% humidity.

Baadal's reading: 10% chance of rain, stratocumulus, with the sky lesson

4. Pocket the phone, then report back. Later, you tell Baadal what really happened, and it keeps an honest score.

Logging what actually happened

5. No photo? Name the cloud yourself. Every option has a one-line description, so even this screen teaches you something.

Choosing a cloud type by hand - from what the viewer can see

Code

GitHub logo Yuthika10 / Baadal

Point your phone at the sky, learn to read it. Gemma 4 identifies the clouds, TabPFN predicts rain in the next 3 hours, and the app teaches you to spot the signs yourself. Built for the Hacktoberfest 2026 DEV Touch Grass challenge.

Baadal โ˜๏ธ

Look up, take one photo, learn to read the sky. Gemma 4 (open-weight vision) reads the clouds, TabPFN (tabular foundation model) turns what you saw plus live humidity and pressure into a rain probability for the next 3 hours and Gemma explains it in two sentences with one "spot it yourself next time" tip.

Sky photo โ”€โ”€โ–บ resized on phone (EXIF/GPS stripped) โ”€โ”€โ–บ Gemma 4 vision
                                                        โ†’ {genus, oktas, towering, confidence}
Live air   โ”€โ”€โ–บ Open-Meteo (humidity, pressure, 3h pressure change, dew point, wind)
                                โ”‚
             same feature code as training (app/features.py)
                                โ–ผ
           TabPFN โ”€โ”€โ–บ P(rain in next 3 h)  [with your eyes]  vs  [weather data only]
                                โ–ผ
           Gemma โ”€โ”€โ–บ 2-sentence explanation + 1 sky-reading tip
                                โ–ผ
           You log "it rained / stayed dry" later โ†’ honest field score

Project layout

Path What it does
scripts/fetch_history.py Downloads 2 years of hourly weather for your location, writes data/training.csv
scripts/evaluate.py TabPFN vs
โ€ฆ

How I Built It

Sky photo โ”€โ–บ resized on your phone (GPS/EXIF stripped) โ”€โ–บ Gemma 4 (vision)
                                                   โ†’ cloud type, coverage, towering?, confidence
Live air  โ”€โ–บ Open-Meteo (humidity, pressure, 3-h pressure change, dew point, wind)
                          โ”‚
           same feature code as training
                          โ–ผ
         TabPFN โ”€โ–บ P(rain in next 3 h): "with your eyes" vs "weather data only"
                          โ–ผ
         Gemma โ”€โ–บ 2-sentence explanation + 1 sky-reading tip
Enter fullscreen mode Exit fullscreen mode

Open-source AI at the core:

  • Gemma 4 (open-weight) runs locally through Ollama (gemma4:e4b) on my laptop, and through the Gemini API (gemma-4-26b-a4b-it) on the hosted demo.
  • TabPFN (Prior Labs' tabular foundation model) runs through tabpfn-client.
  • FastAPI + a single mobile web page, deployed on Render.

The data problem (and the workaround)

There is no public dataset of "sky photo โ†’ did it rain afterwards". So I split the problem in two:

  • TabPFN learns the weather side. I pulled 2 years of hourly history for Mumbai (17,538 hours) from Open-Meteo: cloud cover at low/mid/high levels, humidity, temperature minus dew point, pressure, 3-hour pressure change, wind, recent rain, and time of day and year. The label is whether at least 0.2 mm of rain fell in the following 3 hours. In Mumbai that happens in 32% of all hours, thanks to the monsoon.
  • Gemma translates the photo into those same features. Its answer (say, cumulus, 6/8 covered, towering) is mapped onto the cloud-layer columns. Your eyes act as ground truth for the layer you can actually see, and the weather model fills in the layers hidden behind it.

Both training and live predictions run through one shared feature function, so the model never sees data built two different ways.

Does TabPFN actually help?

I trained on the older 80% of hours (a balanced sample of 3,000 rows) and tested on the most recent 20%, so the model never peeks at the future:

Model ROC-AUC โ†‘ Brier โ†“ F1
Climatology (always guess the average) 0.500 0.398 0.000
Logistic regression 0.905 0.119 0.868
Gradient boosting 0.928 0.107 0.885
TabPFN 0.937 0.118 0.866

ROC-AUC comparison: TabPFN 0.937, gradient boosting 0.928, logistic regression 0.905, climatology 0.500

The axis starts at 0.5, which is what random guessing scores, so the gaps look bigger than they are.

TabPFN ranks rainy hours best (highest AUC), with zero hyperparameter tuning: it's one fit() call on 3,000 rows. Gradient boosting is slightly better calibrated (lower Brier score) and has a marginally higher F1. To be fair to everyone, the test period (May to October) is mostly monsoon, where rain falls in 65% of hours compared with 32% across the training years, so all the models are being tested on a harder, shifted season. I picked TabPFN for the app because it was the strongest at the core job (telling a rainy hour from a dry one) with nothing to tune.

Gemma's two jobs

  1. Vision. A strict prompt asks for a single JSON object: cloud genus, coverage in oktas, towering growth, darkness, confidence, and the visual clues it used. Every answer is validated against that schema. If it doesn't validate, Gemma gets one repair attempt, and if that fails the app says so honestly and lets you pick the cloud type yourself.
  2. Teacher. Gemma writes the two-sentence explanation and the "spot it yourself" tip, and it is told not to invent numbers that aren't in the facts it was given. This is the part I care about most: a forecast tells you about today, but a lesson stays with you.

Three things that broke (and what I learned)

  • "429 Too Many Requests" on Render. Open-Meteo's free API rate-limits by IP address, and Render's servers share outbound IPs with many other apps. The fix: the phone fetches the weather itself (the user's own IP) and sends it along with the photo, with a server-side fallback that has a cache and a retry.
  • Gemma's replies weren't pure JSON. Sometimes there was a draft object, then the real one, then a note. A strict json.loads rejected all of it. I replaced it with a parser that scans for the first complete object containing the keys I need.
  • Windows blocked a dependency. Smart App Control refused to load pyarrow (which tabpfn-client needs) on my laptop. Rather than switch off a security feature, I ran the TabPFN evaluation in Google Colab, and the deployed Linux server runs TabPFN without any issue.

Limitations

  • Gemma can confuse similar clouds (stratocumulus vs altocumulus), and haze can look like cloud. The confidence score and the "Correct it" button exist for exactly this.
  • The cloud-layer history comes from a weather model's estimates, not real observations, so the training data is a proxy.
  • Predicting rain 3 hours out is hard, even for real forecasters. This is a learning tool, not a replacement for a weather service.

Why Does Open Innovation Matter?

Reading the sky was always open knowledge. Nobody owned it; it was passed from one person to the next by pointing upward. It felt right to rebuild it with tools that are open too.

  • Your sky stays yours. In local mode, Gemma 4 runs on my own laptop through Ollama. The photo never leaves the device, and on the hosted version it is resized on the phone (stripping GPS and EXIF) and never stored.
  • It works where you actually look up. Terraces, trails and train platforms don't always have good signal. An open-weight model I can run locally means the vision part doesn't depend on a paid cloud API being reachable.
  • I can swap and tune everything. Same prompt, same JSON schema, different Gemma size: e4b on a laptop, 26b in the cloud. With a closed API I couldn't inspect or change the model, only the prompt.
  • A foundation model for tables changes the economics. TabPFN let me get a strong rain model from a CSV without a training loop or a GPU, and the open ecosystem around it (Open-Meteo's free data, open models) means the whole thing costs $0 to run for a personal project.

Prize Categories

  • Best Use of Gemma: Gemma 4 does both the vision (reading the sky) and the teaching (explaining the forecast), locally via Ollama and hosted via the Gemini API.
  • Best Use of TabPFN: TabPFN is the forecasting model, benchmarked against three baselines on a time-based split.
  • Best Use of Render: the app (frontend + FastAPI + TabPFN predictions) is deployed on Render via a Blueprint.

Tomorrow morning, before you check your phone, step outside and look up for one minute. What do you see? โ˜๏ธ

Top comments (0)