This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
The question that ruins 6 PM every day is not "can I cook?" — it is "आज कà¥à¤¯à¤¾ बनाऊà¤?" (what should I cook today?). Standing in front of an open fridge, recalculating the same inventory for the thousandth time, while hungry. That is decision fatigue, and it costs more energy than the cooking.
आज कà¥à¤¯à¤¾ बनाऊà¤? (Aaj Kya Banau?) ends the ritual:
-
Tick your kitchen once. 52 common Indian-kitchen ingredients as checkboxes in four groups — atta, chawal, dals, sabzis, dahi, masale. The browser remembers it (Gradio
BrowserState) — no account, no server-side storage, nothing leaves your device. - Say how lazy you feel — कम मेहनत caps suggestions at effort 2 out of 5.
- Press one button. The first card is tonight's dinner. A deterministic matcher picks the top 3 from a 40-recipe open database, ranked by fewest missing items, then least effort, then least time.
- "à¤à¤• चीज़ ले आओ" (bring just one thing) — nothing perfect in the kitchen? Instead of pretending, it shows what is one ingredient away: बस टमाटर ले आओ, और सैंडविच बन जाà¤à¤—ा.
- Gemma only writes the mood. A short Hinglish verdict, a one-line pitch and chef tip per dish, and it parses your genuinely messy free text ("thoda basi chawal hai, aadha gobhi bhi") onto the ingredient vocabulary. It never chooses recipes and never invents ingredients — every id in its JSON output is clamped to the database shipped in the repo.
- Model down does not mean dinner down. No API key, no network, rate-limited? The matcher still decides; pitches and tips fall back to the recipe database itself. The app works fully offline in mock mode.
Demo
Live app: https://aaj-kya-banau-rcaf.onrender.com/ (free tier — first load may take a minute to wake)
A real session from testing: with chawal, dahi, aloo, pyaz, tamatar and basics ticked, plus "thoda basi chawal hai, aadha gobhi bhi" typed in the free-text box, the app picked दही-चावल (5 minutes, zero shopping) as tonight's dinner, put मसाला मैगी second — and, because "basi chawal" was parsed onto the vocabulary, बासी चावल à¤à¥à¤¨à¤¾ (fried rice from yesterday's rice) appeared as card 3. The whole round trip, including Gemma's verdict and pitches, took 88 seconds on the free tier.
Code
Everything is on GitHub (MIT, recipes included): https://github.com/Yuser00123/aaj-kya-banau
| File | Role |
|---|---|
kitchen.py |
52-ingredient vocabulary + the matcher (all decisions happen here) |
recipes.py |
the 40-recipe open database — plain, editable Python |
prompts.py |
Gemma's narrow job: the prompt, the clamp, the offline fallback |
llm.py |
provider adapter (any OpenAI-compatible endpoint, Ollama, or mock) |
app.py |
Gradio 6 UI, BrowserState persistence, /health, PWA |
Adding your family's recipe is deliberately boring — no JSON, no schema, eight-ish lines of Python:
R("gobhi_paratha", "गोà¤à¥€ पराठा", "🫓", ["atta", "phool_gobhi"],
["pyaz", "adrak", "lasun", "namak", "tel"], 3, 40, True,
["Gobhi kaddukas karke namak laga ke 10 minute chhod do.",
"Atta gundh ke parathe banao, bhigote bhar lo.",
"Tawe par ghee ke saath sunhare ho tak seko."],
"Sunday-feeling dinner, aaj hi bana lo.",
"Kaddukas geela lage to kapde mein kas ke nikaal do — paratha phulega.")
verify() runs on import and refuses to start the app with a bad ingredient id — a PR that breaks the kitchen breaks the tests. The test suite is 45 offline checks (matcher rules, veg filter, effort caps, free-text parsing, prompt clamping, the /health endpoint) that need no API key and no network.
How I Built It
Before writing code I read the week's entries first — when I checked, the field was full of file sorters, inbox tidiers and chat digesters. Recipe deciders existed but generic, so the opening was: an Indian-kitchen ground truth (a fixed, realistic ingredient vocabulary) and an open recipe database anyone can extend. That is what the sloth sits on.
The central design decision: decisions in code, mood in the model.
- The matcher is ~40 lines of pure Python:
missing <= 0means perfect,missing == 1lands the dish in the one-away list, and a sort key of(missing, fits-sloth-level, effort, minutes)ranks everything else. If nothing fits today's laziness cap, it relaxes the bar and says so loudly instead of quietly returning nothing. - Free text gets a deterministic first pass — Hindi labels and Roman aliases, longest match first, with matched text consumed so "basi chawal" does not also fire "chawal" — and Gemma handles the truly messy rest.
- Gemma makes one JSON call (
verdict, per-recipepitch/tip,parsed_extras,shopping_line) through Gemini's OpenAI-compatible endpoint. The response is then clamped: invented recipe ids are dropped, unknown ingredients are dropped, empty fields are filled from the database. The model can flavor the dinner; it cannot change what's for dinner.
An AI coding agent did most of the typing on this one — the ingredient vocabulary, the matcher rules, the recipe database format and the clamp logic were designed in conversation and I reviewed and tested everything (including catching that my first draft pointed आलू-गोà¤à¥€ at cabbage instead of cauliflower — in most Indian kitchens that dish is फूलगोà¤à¥€).
Deployment is a Render Blueprint from the repo (render.yaml): free web service, health check on /health, the Gemini key as the only secret.
Why Does Open Innovation Matter?
Because the interesting part of this app is not the model — it is the database. Forty everyday recipes in a plain Python file, MIT licensed, eight lines to add your mother's version, with a verifier that keeps contributions honest. A hundred families forking it and adding their own recipes is worth more than any prompt engineering I could do.
And because a small open-weight model, clamped to ids from an open repository, gives AI-flavored writing without AI-authored facts. Swap the endpoint to a local Ollama with one environment variable and the app never talks to a cloud at all — the sloth keeps deciding dinner either way.
Prize Categories
-
Render — deployed as a Blueprint (
render.yaml), free web service,/healthhealth check, sleeps and wakes like a proper sloth. - Gemma — Gemma writes the verdict, pitch and tips and parses messy kitchen notes; JSON mode, single call, output clamped to the open recipe database.





Top comments (0)