<?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: Avinash Kumar</title>
    <description>The latest articles on DEV Community by Avinash Kumar (@avinash_kumar_9cd2bf0c903).</description>
    <link>https://dev.to/avinash_kumar_9cd2bf0c903</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%2F3650511%2Fc69c3cb7-13f3-4539-ae39-d726dd5c77bd.png</url>
      <title>DEV Community: Avinash Kumar</title>
      <link>https://dev.to/avinash_kumar_9cd2bf0c903</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/avinash_kumar_9cd2bf0c903"/>
    <language>en</language>
    <item>
      <title>🍛 Khana Kya Hai? — Ranchi Hostel Mess &amp; Allergy Planner with Google Gemma</title>
      <dc:creator>Avinash Kumar</dc:creator>
      <pubDate>Sat, 03 Oct 2026 06:28:49 +0000</pubDate>
      <link>https://dev.to/avinash_kumar_9cd2bf0c903/khana-kya-hai-ranchi-hostel-mess-allergy-planner-with-google-gemma-4okd</link>
      <guid>https://dev.to/avinash_kumar_9cd2bf0c903/khana-kya-hai-ranchi-hostel-mess-allergy-planner-with-google-gemma-4okd</guid>
      <description>&lt;p&gt;&lt;strong&gt;"Aaj mess mein kya kha sakta hoon?"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;That is a simple question, but hostel mess menus become much harder to deal with when someone has a food allergy, intolerance, or dietary restriction.&lt;/p&gt;

&lt;p&gt;For the Hacktoberfest 2026 Weekend Challenge: &lt;strong&gt;Build for a Friend&lt;/strong&gt;, I built &lt;strong&gt;Khana Kya Hai?&lt;/strong&gt;, a small AI-powered hostel mess planner that helps turn a daily mess menu into practical &lt;strong&gt;avoid&lt;/strong&gt;, &lt;strong&gt;verify&lt;/strong&gt;, and &lt;strong&gt;suitable-looking&lt;/strong&gt; options.&lt;/p&gt;

&lt;h2&gt;
  
  
  🤝 Building for a Friend
&lt;/h2&gt;

&lt;p&gt;I built this around a real hostel problem faced by a friend.&lt;/p&gt;

&lt;p&gt;In a hostel, students often do not get detailed ingredient information for every dish. Even when a dish looks safe, its ingredients or cooking method may be unclear.&lt;/p&gt;

&lt;p&gt;The goal of &lt;strong&gt;Khana Kya Hai?&lt;/strong&gt; is not to provide medical advice. Instead, it helps a student organize the available menu and identify which items should be avoided, which need verification, and which appear suitable based on the information provided.&lt;/p&gt;

&lt;p&gt;I also showed the prototype to my hostel roommate Rahul, who deals with dairy sensitivities. He found the practical backup suggestions useful because hostel mess staff may not always be able to change the cooking method for an individual request.&lt;/p&gt;

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

&lt;p&gt;Khana Kya Hai? takes four inputs:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Today's hostel mess menu&lt;/li&gt;
&lt;li&gt;Allergies or intolerances&lt;/li&gt;
&lt;li&gt;Dietary preference&lt;/li&gt;
&lt;li&gt;Daily food budget&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It then uses &lt;strong&gt;Google's Gemma open-weight model&lt;/strong&gt; to analyze the menu and generate a structured recommendation.&lt;/p&gt;

&lt;p&gt;The interface is built with &lt;strong&gt;Gradio&lt;/strong&gt; and runs from a Google Colab notebook.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧠 How It Works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User Input
   |
   v
Mess Menu + Allergy + Diet + Budget
   |
   v
Google Gemma 4 31B
   |
   v
Menu Analysis
   |
   v
Python Safety / Consistency Layer
   |
   v
Final Recommendation
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemma handles the natural-language reasoning around the menu.&lt;/p&gt;

&lt;p&gt;A separate Python layer performs deterministic checks for known allergy-related keywords and cleans the model output.&lt;/p&gt;

&lt;p&gt;This extra layer also helps prevent contradictions, such as recommending a menu item after it has already been placed in the avoid list.&lt;/p&gt;

&lt;p&gt;The application separates results into:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;AVOID&lt;/strong&gt; — the item conflicts with the provided restriction&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;VERIFY&lt;/strong&gt; — ingredients or preparation are uncertain&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;SUITABLE-LOOKING&lt;/strong&gt; — the item appears compatible based on the available information&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛡️ Why Add a Deterministic Layer?
&lt;/h2&gt;

&lt;p&gt;Generative AI is flexible, but food restrictions are a situation where blindly displaying generated text is not a good design.&lt;/p&gt;

&lt;p&gt;Khana Kya Hai? therefore keeps explicit keyword-based checks outside the model.&lt;/p&gt;

&lt;p&gt;For example, dairy-related inputs can expand into related terms such as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;milk
dairy
paneer
cheese
butter
cream
curd
yogurt
kheer
ghee
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The Python layer checks the generated categories against these terms and removes contradictory suitable/recommended results when an item is identified as conflicting with the provided restriction.&lt;/p&gt;

&lt;p&gt;This is not a medical safety guarantee. It is a deterministic consistency layer around a generative model.&lt;/p&gt;

&lt;h2&gt;
  
  
  🖥️ Demo
&lt;/h2&gt;

&lt;h5&gt;
  
  
  🔗 Live Demo
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://89e2f7646d24c04115.gradio.live/" rel="noopener noreferrer"&gt;Open Khana Kya Hai?&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Example Input
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Today's Mess Menu:
Aloo Paratha, Paneer Butter Masala, Rice, Dal, Kheer

Allergy:
Milk / Dairy

Diet:
Vegetarian

Budget:
₹100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Example Output
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Avoid:
- Paneer Butter Masala
- Kheer

Verify:
- Aloo Paratha
- Dal

Suitable-looking:
- Rice

Recommended Meal:
- Rice
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The application can also provide a low-cost alternative when the available mess menu does not fit the user's restrictions.&lt;/p&gt;

&lt;h2&gt;
  
  
  🧪 Testing
&lt;/h2&gt;

&lt;p&gt;I tested the prototype with several hostel-style cases:&lt;/p&gt;

&lt;h3&gt;
  
  
  Dairy restriction
&lt;/h3&gt;

&lt;p&gt;The application identified clearly dairy-heavy items such as paneer-based dishes and kheer for avoidance, while uncertain preparation cases such as paratha or dal could be placed under verification.&lt;/p&gt;

&lt;h3&gt;
  
  
  Peanut restriction
&lt;/h3&gt;

&lt;p&gt;The application was tested with peanut as a restriction and checked that unrelated menu items were not automatically classified as peanut-containing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Vegetarian preference
&lt;/h3&gt;

&lt;p&gt;When a menu included chicken curry and the selected diet was vegetarian, the application classified chicken as an item to avoid and did not recommend it as a meal.&lt;/p&gt;

&lt;h3&gt;
  
  
  Consistency testing
&lt;/h3&gt;

&lt;p&gt;I also tested cases where an item could potentially appear in both an unsafe category and a recommendation. The Python consistency layer was added to reduce that kind of contradiction.&lt;/p&gt;

&lt;h2&gt;
  
  
  💰 Practical Alternatives
&lt;/h2&gt;

&lt;p&gt;When the available mess menu does not fit the user's restrictions, the prototype can suggest a simple low-cost backup option.&lt;/p&gt;

&lt;p&gt;Current alternatives include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Banana + Roasted Chana — ₹25
Aloo Sandwich — ₹40
Peanut + Banana — ₹25
Plain Rice + Ready-to-eat Dal — ₹45
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are application-defined alternative estimates, not prices claimed for the hostel mess.&lt;/p&gt;

&lt;p&gt;The alternative logic also avoids the peanut option when peanut is provided as an allergy.&lt;/p&gt;

&lt;h2&gt;
  
  
  🌱 Why Open Innovation &amp;amp; Gemma Matter
&lt;/h2&gt;

&lt;p&gt;This project uses &lt;strong&gt;Google's Gemma, an open-weight model&lt;/strong&gt;, as the core AI component.&lt;/p&gt;

&lt;p&gt;What interested me was using the model for the actual natural-language reasoning around messy hostel menu descriptions rather than simply adding an AI chatbot to the interface.&lt;/p&gt;

&lt;p&gt;An open-weight approach also leaves room for future experimentation such as swapping models, adapting the model, or moving toward local inference.&lt;/p&gt;

&lt;p&gt;For a project involving personal food restrictions, that future possibility is particularly interesting because local inference could reduce the need to send such information to an external service.&lt;/p&gt;

&lt;h2&gt;
  
  
  👥 Feedback From My Hostel Friend
&lt;/h2&gt;

&lt;p&gt;After I showed the prototype to my hostel roommate Rahul, he liked the idea of having practical backup suggestions when the hostel mess cannot easily change its ingredients or cooking method.&lt;/p&gt;

&lt;p&gt;His feedback made me think beyond simply identifying foods and focus more on what a student can realistically do when the menu does not fit their restrictions.&lt;/p&gt;

&lt;h2&gt;
  
  
  🏆 Hacktoberfest 2026
&lt;/h2&gt;

&lt;p&gt;This project was built for the &lt;strong&gt;Hacktoberfest Weekend Challenge: Build for a Friend&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Submission Category
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best Use of Gemma&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The project uses Google's Gemma as its core AI model and explores how an open-weight model can be used to solve a small, practical hostel problem.&lt;/p&gt;

&lt;p&gt;The challenge asks participants to build a new project with open-source AI at its core, explain why open innovation matters, and show who the project was built for. :chatgpt-content-reference{index="4"}&lt;/p&gt;

&lt;h2&gt;
  
  
  📸 Screenshots
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Home Interface
&lt;/h3&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%2Frc5x9j27w3lsty06dy3m.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%2Frc5x9j27w3lsty06dy3m.png" alt="Khana Kya Hai? Home" width="799" height="390"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Dairy Allergy Test
&lt;/h3&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%2Fi3l0x7akov7n0w5pfnus.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%2Fi3l0x7akov7n0w5pfnus.png" alt="Khana Kya Hai? Dairy Test" width="799" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  🔐 API Key Handling
&lt;/h2&gt;

&lt;p&gt;The API key is not stored in the GitHub repository.&lt;/p&gt;

&lt;p&gt;For the Colab version, the key is stored using Google Colab Secrets.&lt;/p&gt;

&lt;p&gt;Create:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GEMMA_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and enable notebook access.&lt;/p&gt;

&lt;h2&gt;
  
  
  ▶️ How to Run
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Open &lt;code&gt;khana_kya_hai.ipynb&lt;/code&gt; in Google Colab.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Add your Google AI Studio API key to Colab Secrets using:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;GEMMA_API_KEY
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Run the notebook cells in order.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Enter:&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Mess menu
Allergies / intolerances
Dietary preference
Daily food budget
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Click:
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Analyze My Food
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The notebook launches the Gradio interface.&lt;/p&gt;

&lt;h2&gt;
  
  
  📁 Source Code
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;GitHub Repository:&lt;/strong&gt;&lt;br&gt;&lt;br&gt;
&lt;a href="https://github.com/Avinash-sdbegin/khana-kya-hai" rel="noopener noreferrer"&gt;https://github.com/Avinash-sdbegin/khana-kya-hai&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The repository contains the Colab notebook, README, and project screenshots.&lt;/p&gt;
&lt;h2&gt;
  
  
  📚 What I Learned
&lt;/h2&gt;

&lt;p&gt;The biggest lesson from this project was that adding a language model is only one part of building a useful application.&lt;/p&gt;

&lt;p&gt;The more interesting part was combining:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Generative AI
      +
Deterministic Python Rules
      +
Simple Human-Centered UI
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Gemma provides flexible natural-language reasoning, while the Python layer provides predictable checks for known allergy-related terms.&lt;/p&gt;

&lt;p&gt;Building this for an actual hostel use case also helped me think more about practical constraints instead of designing only for a technical demo.&lt;/p&gt;

&lt;h2&gt;
  
  
  🔮 Future Improvements
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Better ingredient and allergen detection&lt;/li&gt;
&lt;li&gt;Hostel-specific menu history&lt;/li&gt;
&lt;li&gt;More accurate price estimation&lt;/li&gt;
&lt;li&gt;Weekly meal planning&lt;/li&gt;
&lt;li&gt;Local/offline model support&lt;/li&gt;
&lt;li&gt;Personalized food preferences&lt;/li&gt;
&lt;li&gt;Better handling of regional Indian dishes&lt;/li&gt;
&lt;li&gt;More detailed cross-contact detection&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  ⚠️ Safety Note
&lt;/h2&gt;

&lt;p&gt;Khana Kya Hai? is an educational and hackathon prototype.&lt;/p&gt;

&lt;p&gt;It is &lt;strong&gt;not a medical or allergy-diagnosis system&lt;/strong&gt; and should not be treated as one.&lt;/p&gt;

&lt;p&gt;Food ingredients, recipes, cooking methods, and cross-contact can vary between messes. Users should always verify ingredients, cooking medium, and possible cross-contact with the food provider before eating.&lt;/p&gt;

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