Recipe Studio – Local AI-Powered Recipe Generator (Built with Flet & Ollama)
Transform ideas into beautifully formatted recipes—all from a single desktop file!
Project Overview
What it is: A standalone desktop application that leverages local AI (via Ollama) to convert your simple recipe ideas into polished and user-friendly outputs. Built using Flet for a clean UI experience.
Why it matters:
- No more dealing with clunky JSON interfaces—just write an idea, get a recipe.
- Designed for reliability: intelligent formatting, error fixing, and user-friendly fallback ensure a smooth experience every time.
- Quick, visual, and distraction-free—perfect for chefs, home cooks, and digital creators.
Key Features
Reliable Output Pipeline
Enforces JSON formatting, automatic error correction, and text fallback using heuristics.
Clean, Minimal UI
No raw JSON—just a sleek overlay showing “Generating…” animations, centered layout, and rendered ingredients/steps.
Smart UI Design
Auto-generated titles per session, Markdown copy-to-clipboard functionality, and a visually pleasing interface—all within a single-file app.
Technical Architecture
Flow: [ Flet UI ] → [ Ollama AI Model (format=json) ] → [ JSON Parsing & Repair ] → [ Text Rendering in Flet ]
Core Logic Details:
extract_json_block()
: captures valid JSON from the AI output.repair_json_like()
: fixes common structural errors like formatting and punctuation.heuristic_from_text()
: intelligent fallback to parse recipes from plain text.sanitize_recipe_data()
: cleans and shapes recipe components for display readiness.
Why It’s Noteworthy
Aspect | Details |
---|---|
Efficiency | Compact and powerful—a full recipe workflow in one file! |
UX-First Design | Puts user experience above raw data; aligns with modern UI values. |
Robustness | Graceful fallback/repair logic ensures consistent results. |
Technical Depth | Demonstrates AI integration, UI frameworks, and error handling. |
Creativity | Shows both design intuition and technical innovation. |
Screenshots / Prototype Visuals
Showcase the sleek UI with its overlay and recipe rendering. Emphasize the dynamic “Generating…” animation, and illustrate the journey with before-and-after examples: from the initial idea to the final recipe output.