DEV Community

Rahul Gupta
Rahul Gupta

Posted on

Lazy Cook: an open-weight AI that turns whatever is in your fridge into an easy Indian dish

I built this for Hacktoberfest Week 3 ("Slow and Steady") but missed the deadline, so this is a regular post and not a challenge entry.

What I Built

Lazy Cook is a small web app for tired people who stand at the fridge and cannot decide what to cook. You type what you have, how many minutes you can spare, your diet, and what you can cook with (one pan on gas, a pressure cooker, or a microwave). It gives you one easy Indian dish, a shopping list of 3 items at most, and 3 to 6 steps that fit your time.

Demo

Live app: https://rahul-lazy-cook.streamlit.app/

Code

https://github.com/Rahulgupta-63/lazy-cook

How I Built It

  • Model: GPT-OSS 20B (openai/gpt-oss-20b), an open-weight model, through the Groq API.
  • App: Python and Streamlit, deployed on Streamlit Community Cloud.

The hard part was trusting the answer, not getting an answer. A language model can easily suggest eggs to a vegetarian, a stove to someone with only a microwave, or a recipe that takes 40 minutes when you asked for 15. So the app checks every recipe in code before showing it:

  • The total time is within your limit.
  • There are 3 to 6 numbered steps.
  • The shopping list has 3 items or fewer.
  • The diet rule is kept (no eggs or meat for a vegetarian).
  • It does not use equipment you don't have.
  • It does not use foods you asked to avoid.
  • It actually uses your ingredients.
  • No calorie numbers or health claims.

If a check fails, the app sends the exact problems back to the model and tries again, up to 2 more times. If it still fails, it shows the recipe with a clear warning.

Input safety: item lists are cut to 12 items of 30 characters, and anything that is not food (like bleach) is blocked. The item text is treated as data, so a pasted instruction cannot change the rules.

Tests: 150 automated checks on 10 situations, plus headless runs of the full app. These test my rules and my retry logic with a fake model. They do not test the real model's cooking advice.

Honest limits

  • The model runs on Groq's servers through an API, so it needs internet. Your ingredient list leaves your device, so don't type anything private.
  • I have not tested it with real users yet, and I have not compared it with a closed model.
  • It is AI-generated. Check that food is fresh and fully cooked. It is not nutrition advice.

Why Open-Weight Models

The value of this project is the rule checker, not one specific model. Because the model is open-weight, I can swap it and run the same checks again. This happened to me: a Llama model I used on Groq became unavailable while I was building other projects, and I moved to GPT-OSS by changing one line.

Next step (not built yet): run a small open model on my own laptop, so nothing leaves the device.

AI Disclosure

I used an AI assistant (Claude) to help write the code and draft this post. I ran the tests, deployed the app, and edited the post myself.

Top comments (0)