Cook_with_a_LLM / README.md
Fred1e4's picture
Complete Cook App (#5)
75c5414
|
Raw
History Blame
2.87 kB
metadata
title: Cook With A LLM
emoji: 🍲
colorFrom: red
colorTo: yellow
sdk: gradio
sdk_version: 6.15.2
python_version: '3.12'
app_file: app.py
pinned: false
license: apache-2.0

🍲 Cook With Me β€” Multimodal Sous-Chef

Snap your fridge. Pick a dish. Cook step by step. Check your progress with a photo.

A closed-loop multimodal cooking assistant built for the Hugging Face Small Models / Big Adventures Hackathon (June 2026).


How it works

πŸ“Έ Fridge photo  ──▢  [Vision Agent]          identify ingredients
                            β”‚
                            β–Ό
                      [Recipe Planner]         propose 3 dishes β†’ full recipe JSON
                            β”‚
                            β–Ό
                      [Nutrition Engine]       per-serving macros (lookup, no hallucination)
                            β”‚
                            β–Ό
πŸ“Έ Progress photo ──▢  [Progress Validator]    go / wait / fix verdict
  1. Snap your fridge or pantry β€” the fine-tuned vision model identifies every ingredient.
  2. Pick one of three AI-suggested dishes tailored to what you have.
  3. Cook step by step with a generated recipe and per-serving nutrition info.
  4. Check your progress by uploading a photo of your pan β€” the model tells you go, wait, or fix.

Models

Role Model Params Runtime
Vision + Planner + Validator openbmb/MiniCPM-V-4.6 (fine-tuned) ~4.6B transformers / ZeroGPU

Total: ~4.6B parameters (≀ 32B cap βœ“ β€” significant headroom)

The ingredient-identification model is fine-tuned on fridge/pantry photos for higher precision.


Badges targeted

Badge Status How
🎯 Well-Tuned βœ“ Fine-tuned MiniCPM-V-4.6 for ingredient detection, published to Hub
🎨 Off-Brand βœ“ Recipe-card UI with custom CSS β€” Lora serif, warm parchment palette
πŸ“‘ Sharing is Caring βœ“ Agent traces shared on Hub
πŸ““ Field Notes βœ“ Blog post: "Building a closed-loop visual cooking coach"

Architecture highlights

  • Single model, three roles: MiniCPM-V-4.6 handles vision (ingredients + progress) and text planning (recipe JSON generation) β€” no redundant model downloads.
  • Closed-loop visual validation: Flux generates step targets β†’ user cooks β†’ vision model compares β€” a real agent loop, not a wrapper.
  • Hallucination-free nutrition: macros come from a lookup table, not LLM arithmetic.
  • Robust JSON extraction: multi-strategy parser handles markdown fences, single quotes, and trailing commas so generation failures degrade gracefully.

Track

Chapter One β€” Backyard AI Β· "Build something for someone you actually know."

Submission for the Hugging Face Hackathon Β· June 5–15, 2026.