DEV Community

devkshitij7
devkshitij7

Posted on

DakshinVani: A Local Gemma Agent

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

What I Built

DakshinVani (दक्षिण वाणी) translates South Indian restaurant menus into Hindi, Marathi, French, Japanese, and German — without falling into the literal-translation traps that make generic tools turn beloved dishes into nonsense or culinary horror.

Walk into an authentic South Indian tiffin room and run their menu through a generic translation tool. Suddenly, iconic dishes turn into comedy—or worse, culinary horror:

Authentic Dish Generic Translator Output (Literal Trap) Why Diners Walk Away
Mysuru Bisi Bele Bath "गर्म दाल स्नान" / "Hot Lentil Bath" / "温かいレンズ豆のお風呂" Translates Kannada Bath (spiced rice dish) as a literal bath!
Ghee Roast Podi Masala Dosa "घी रोस्ट पाउडर डोसा" / "Clarified Butter Powder Crepe" Translates Milagai Podi (stone-ground roasted lentil & chili condiment) as industrial "powder/dust".
Medu Vada with Tiffin Sambar "सॉफ्ट दाल केक" / "Gâteau mou aux lentilles" / "柔らかい豆のケーキ" Translates Medu (soft interior) as a sweet/soggy "soft bean cake" instead of a crisp savory black-gram fritter.
Chettinad Kuzhi Paniyaram "गड्ढे के पकौड़े" / "Boulettes de fosse" / "穴の団子" Translates Kuzhi (cast-iron dimpled mold) as "pit/hole dumplings".
Kumbakonam Degree Filter Kaapi "तापमान फ़िल्टर कॉफ़ी" / "Temperature Filtered Coffee" Misses that Degree refers to lactometer-certified pure full-cream cow's milk pulled between a brass Davara and Tumbler.

DakshinVani is an open-source, locally hosted 3-Stage Culinary Menu Translator Agent powered by Google Gemma (gemma3:4b) that translates South Indian restaurant menus into Hindi (हिन्दी — Primary), Marathi (मराठी), French (Français), Japanese (日本語), and German (Deutsch).

Who'd pay for this: small family-run tiffin rooms and South Indian restaurants abroad, who need accurate, appetizing multilingual menus for tourists and diaspora diners but can't afford a recurring SaaS translation subscription or risk their recipes being sent to third-party training pipelines.

Demo

Run locally:

\bash
git clone https://github.com/kshitij9896/dakshin_vani_gemma_menu_translator
cd dakshin_vani_gemma_menu_translator
pip install -r requirements.txt
python -m uvicorn server:app --reload --port 8000
\
\

Then open http://localhost:8000

Code

https://bitly.cx/n8Yzf

How I Built It

How the 3-Stage Gemma Agent Works

  1. Stage 1 — DishDeconstructor (Culinary RAG & Allergen Extraction): Scans dish names and chef notes against a curated South Indian Culinary Knowledge Base (south_indian_culinary_kb.json), flagging regional nouns (Podi, Bath, Kuzhi, Degree, Medu, Rasam, Pesarattu, Veechu), cooking vessels, fermentation times, and hidden allergens (A2 cow ghee, sesame oil, mustard seeds, cashews, urad dal).
  2. Stage 2 — CulturalBridgeMapper: Maps textures and techniques to each target language's culinary intuition:
    • Hindi (हिन्दी): Bridges South Indian tempering (thalippu) and Podi/Bath concepts for North/Central Indian diners.
    • Marathi (मराठी): Connects Kuzhi Paniyaram to Appe, Milagu Rasam to digestive Saar, and Bisi Bele Bath to Masale Bhat with Marathi Moggu (kapok buds).
    • French (Français): Uses precise gastronomic parallels (galette dentelle fermentée, beignet salé crousti-moelleux, consommé au tamarin, feuilletage à la volée).
    • Japanese (日本語): Draws intuitive parallels to cast-iron Takoyaki molds for Kuzhi Paniyaram, Ganmodoki textures for Medu Vada, and Ochazuke dining style for Rasam.
    • German (Deutsch): Highlights sourdough-style natural fermentation, Gusseisen-Muldenpfanne baking, and strict allergen clarity.
  3. Stage 3 — GemmaMenuCopywriter: Generates print-ready multilingual menu cards with native script titles, sensory descriptions, phonetic pronunciation guides, and a "How to Eat" note.

Why Does Open Innovation Matter?

Small family-run tiffin rooms operate on razor-thin margins. They won't pay $50/month for a recurring SaaS subscription just to translate seasonal specials, and they don't want their secret family spice ratios (Bisi Bele Bath 18-spice masala or Milagai Podi proportions) sent to third-party training pipelines.

By running Google Gemma (gemma3:4b) locally via Ollama:

  • Zero Marginal API Cost: Once set up on a restaurant manager's laptop, translating new daily specials into 5 languages costs ₹0 / $0.
  • Domain Control Over Generic APIs: Closed translation APIs don't let you inject a deterministic South Indian culinary ontology before decoding. With open-weight Gemma + our local JSON RAG graph, the restaurant owns both the glossary and the tone.
  • Offline Reliability: Works entirely offline inside the restaurant kitchen or print shop.

Prize Categories

  • Best Use of Gemma: Uses Google's open-weight Gemma model (gemma3:4b / gemma2:9b) as the reasoning and multilingual copywriting engine in a 3-stage agentic pipeline.

My Agent Session

DakshinVani — Building an Open-Source Gemma South Indian Menu Translator Agent gemma3:4b
You

We are building DakshinVani — an open-source South Indian Restaurant Menu Translator Agent powered by Google Gemma (gemma3:4b via Ollama) for the Hacktoberfest Week 2 Side Hustle challenge.
1. Inspect data/south_indian_culinary_kb.json and agent/gemma_menu_agent.py.
2. Run python3 agent/gemma_menu_agent.py --dish "Ghee Roast Podi Masala Dosa" --langs hi,mr,fr,ja,de and python3 agent/gemma_menu_agent.py --dish "Mysuru Bisi Bele Bath with Kara Boondi" --langs hi,mr,fr,ja,de in the terminal to verify how the 3-stage agent (DishDeconstructor -> CulturalBridgeMapper -> GemmaMenuCopywriter) avoids literal translation traps like "Powder Crepe" or "Hot Lentil Bath".

Agent

Inspected the culinary knowledge base (data/south_indian_culinary_kb.json) and the 3-stage Gemma agent architecture in agent/gemma_menu_agent.py. The agent pipeline comprises:
- Stage 1: DishDeconstructor (Culinary RAG & glossary trap extraction)
- Stage 2: CulturalBridgeMapper (Gastronomic lenses across Hindi, Marathi, French, Japanese, and German)
- Stage 3: GemmaMenuCopywriter (Structured native-script copywriting & dining etiquette)

Fixed Windows stdout encoding with sys.stdout.reconfigure(encoding='utf-8') to support Devanagari, Tamil, Kannada, and Japanese scripts.

Executed translation runs for "Ghee Roast Podi Masala Dosa" and "Mysuru Bisi Bele Bath with Kara Boondi".

You

Now let's test custom dish synthesis and check the web app:
1. Run python3 agent/gemma_menu_agent.py --dish "Rava Kesari Bath" --notes "Slow-roasted semolina pudding infused with Pampore saffron, ghee-fried cashews, and ripe pineapple" --langs hi,mr,fr,ja,de.
2. Verify all 5 target languages (Hindi primary, Marathi, French, Japanese, and German) return generic-vs-agent comparisons, allergen tags, and cultural dining tips.

Agent

Tested custom dish synthesis for 'Rava Kesari Bath' with custom chef notes. Verified all 5 target languages return rich generic vs. agent comparisons, allergen tags (wheat gluten, ghee/dairy, tree nuts), and cultural dining tips.
Started and validated the FastAPI local web application at http://localhost:8000.

You

Use DevRelay (devrelay-gateway) to:
1. Check the active Hacktoberfest Week 2 challenge (get_challenges).
2. Save/share this agent session transcript via DevRelay so we get the embeddable DevRelay session link.
3. Create a private DEV draft (create_article with published: false) using the write-up in DEV_SUBMISSION_POST.md, tagged #devchallenge, #hf26challenge, #gemma, #ai, and embed our DevRelay session link!

Agent

Connected to DevRelay gateway and DEV API authenticated as devkshitij7:
1. Checked active Hacktoberfest Week 2 Challenge: ID 80 ('Hacktoberfest Open-Source AI Challenge: Week 2 - Side Hustle').
2. Saved and shared this complete agent session transcript via DevRelay.
3. Embedded the DevRelay session liquid tag {% agent_session 1001 %} into DEV_SUBMISSION_POST.md and created the private draft on DEV.

Session Link: View interactive agent session on DEV
Recorded with DevRelay in Google Antigravity (Gemini 3.8 Flash)

Top comments (0)