<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Gurmeet Singh</title>
    <description>The latest articles on DEV Community by Gurmeet Singh (@gurmeet_singh_4bbd1d4c9b2).</description>
    <link>https://dev.to/gurmeet_singh_4bbd1d4c9b2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4152313%2Fe6836525-c31a-4b05-973b-b1c0a303141c.png</url>
      <title>DEV Community: Gurmeet Singh</title>
      <link>https://dev.to/gurmeet_singh_4bbd1d4c9b2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gurmeet_singh_4bbd1d4c9b2"/>
    <language>en</language>
    <item>
      <title>High-Protein Recipe Remixer: Local AI that Turns "Bhel" into "Soya Bhel" &amp; Counts Macros Offline</title>
      <dc:creator>Gurmeet Singh</dc:creator>
      <pubDate>Sun, 04 Oct 2026 16:01:16 +0000</pubDate>
      <link>https://dev.to/gurmeet_singh_4bbd1d4c9b2/high-protein-recipe-remixer-local-ai-that-turns-bhel-into-soya-bhel-counts-macros-offline-m18</link>
      <guid>https://dev.to/gurmeet_singh_4bbd1d4c9b2/high-protein-recipe-remixer-local-ai-that-turns-bhel-into-soya-bhel-counts-macros-offline-m18</guid>
      <description>&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/challenges/hacktoberfest-weekend-2026-10-01"&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Recipe → Macro Calculator + High-Protein Variant Generator&lt;/strong&gt; — a fully local Streamlit app that:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Extracts ingredients&lt;/strong&gt; from any recipe URL or photo (OCR + LLM)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Matches to USDA nutrition data&lt;/strong&gt; → calculates macros per serving&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scales recipes&lt;/strong&gt; to a target calorie goal&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Generates high-protein variants&lt;/strong&gt; of any dish (e.g., "bhel" → "Soya Bhel Puri" with 28g protein/serving)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Built for:&lt;/strong&gt; My gym partner &lt;strong&gt;Arjun&lt;/strong&gt;, who meal-preps every Sunday but wastes 30+ min manually calculating macros in spreadsheets and googling "high protein [dish] alternatives." He wants to hit 180g protein/day on a vegetarian Indian diet without eating plain chicken breast.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Problem solved:&lt;/strong&gt; Paste a recipe URL → get instant macros + grocery list. Type "paneer tikka" → get a 35g-protein version with Greek yogurt marinade + tofu swap. All offline, no accounts, data never leaves his laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzn4no2xl25e6z6aohdh7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzn4no2xl25e6z6aohdh7.png" alt="Demo Image 1" width="800" height="285"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxekdx5zr20w2bdur607m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxekdx5zr20w2bdur607m.png" alt="Demo Image 2" width="800" height="224"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmu5d243bht1tdml4vz6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcmu5d243bht1tdml4vz6.png" alt="Result" width="800" height="332"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Code
&lt;/h2&gt;

&lt;p&gt;GitHub Repo: &lt;a href="https://github.com/GurmeetsinghRelusinghani28/recipe-macro-calculator" rel="noopener noreferrer"&gt;https://github.com/GurmeetsinghRelusinghani28/recipe-macro-calculator&lt;/a&gt;&lt;br&gt;
Key files:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;app.py — Streamlit UI (3 tabs: URL, Photo, High-Protein Swap)&lt;/li&gt;
&lt;li&gt;scraper.py + parser.py — Trafilatura + Ollama (gemma2:2b) for ingredient extraction&lt;/li&gt;
&lt;li&gt;matcher.py — RapidFuzz + USDA Foundation Foods CSV (local)&lt;/li&gt;
&lt;li&gt;suggester.py — LLM prompt for high-protein recipe variants&lt;/li&gt;
&lt;li&gt;download_usda.py — Downloads &amp;amp; merges USDA nutrient data (one-time)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  How I Built It
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyng3af6q0g068ttwuxr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fuyng3af6q0g068ttwuxr.png" alt=" " width="723" height="480"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;URL/Photo → Scraper/OCR → LLM Parser → JSON ingredients&lt;br&gt;
                                    ↓&lt;br&gt;
                        RapidFuzz → USDA CSV → Macros&lt;br&gt;
                                    ↓&lt;br&gt;
                        Scale to target kcal → Grocery list&lt;br&gt;
                                    ↓&lt;br&gt;
                    High-Protein Swap: LLM Variant → same pipeline&lt;/p&gt;

&lt;p&gt;Models pulled locally:&lt;br&gt;
ollama pull gemma2:2b    # text parsing + variant generation&lt;br&gt;
ollama pull llava:7b     # photo OCR cleanup&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Does Open Innovation Matter?
&lt;/h2&gt;

&lt;p&gt;This project only works because every piece is open:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Runs on a 4-year-old laptop (16GB RAM, no GPU) — Gemma 2B + LLaVA 7B quantized to 4-bit. Try that with GPT-4o or Claude.&lt;/li&gt;
&lt;li&gt;Zero data leaves the machine — Arjun's recipe photos, dietary goals, and meal plans stay on his disk. No cloud upload, no training data harvesting, no subscription.&lt;/li&gt;
&lt;li&gt;Swappable models — I tested qwen2.5:3b, phi3:3.8b, gemma2:2b by changing one line. Closed APIs lock you in.&lt;/li&gt;
&lt;li&gt;Fine-tunable — If Arjun wants "Gujarati-style" variants, I can fine-tune Gemma on 50 examples via Tinker. Impossible with closed models.&lt;/li&gt;
&lt;li&gt;Costs $0/month forever — No token pricing, no rate limits, no "pricing tier changed" emails.&lt;/li&gt;
&lt;li&gt;USDA data is public domain — The nutrition backbone is open government data. Proprietary APIs (Nutritionix, Edamam) cost $100s/month and throttle.
Where closed would fail:&lt;/li&gt;
&lt;li&gt;Cloud vision API → fails on gym WiFi, uploads friend's food photos&lt;/li&gt;
&lt;li&gt;Nutrition API → rate limits kill batch meal-prep (50 recipes at once)&lt;/li&gt;
&lt;li&gt;LLM API → $0.01/recipe adds up; can't fine-tune for "Indian vegetarian high-protein"&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  My Agent Session
&lt;/h2&gt;

&lt;h2&gt;
  
  
  Prize Categories
&lt;/h2&gt;

&lt;p&gt;Best Use of Gemma — Core text model (gemma2:2b) for parsing + variant generation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Best Use of Ollama — Local inference runtime for both text + vision models&lt;/li&gt;
&lt;li&gt;Best Use of MongoDB Atlas — Not used (SQLite for logs, USDA CSV for data)&lt;/li&gt;
&lt;li&gt;Best Use of Render — Not used (runs fully local, but deployable to Render free tier)&lt;/li&gt;
&lt;li&gt;Best Use of Backboard — Not used (single-file agents, no RAG needed)&lt;/li&gt;
&lt;li&gt;Best Use of ElevenLabs — Not used (no voice feature yet)
Note: Primary entry: Gemma + Ollama (open-weight models + local runtime). Other categories listed for completeness but not claimed.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;One-Liner for Socials&lt;/strong&gt;
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Built my gym partner a local AI that turns any recipe into a high-protein version + counts macros — runs offline on his laptop with Gemma 2B + USDA data. No API keys, no cloud, $0/month. 🏋️‍♂️🥗 #Hacktoberfest #BuildForAFriend&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>devchallenge</category>
      <category>weekendchallenge</category>
      <category>hf26challenge</category>
    </item>
  </channel>
</rss>
