DEV Community

Cover image for A Meal Prep Co-Pilot Built with Google Gemini - A Reflection
Marie Otoo
Marie Otoo

Posted on

A Meal Prep Co-Pilot Built with Google Gemini - A Reflection

This is a submission for the Built with Google Gemini: Writing Challenge

Introduction

Meal decisions are not as rosy as enjoying the meal. The majority of individuals might view from a lens, the whole act of recipe preparation as a nightmare. Whereas some dishes are repetitive, eating the same old meal could be tedious. The thought of staring at ingredients to produce dishes is a myth to most, but in this age of Artificial Intelligence, where models are readily available, it is worth a try. This project was implemented during the Major League Hacking (MLH) Global Hack Beginners Week event, where participants completed various challenges. One of these challenges was to create a helper for tasks, under which this meal prep project is categorized. These MLH events happen throughout the year, both in person and virtual and seeing the former uniting with the DEV community to present this challenge is an opportunity to submit the meal prep project I built using Google Gemini.

What I Built with Google Gemini

A meal planner that takes ingredients from your refrigerator and outputs a full-course meal to you. Gemini was used in the brainstorming phase to generate the project outline. Then, further utilized in natural language conversations and exchanges to complete the project. The meal prep app takes an image and scans it with the Gemini API key, obtained from Google AI Studio, to give full recipe suggestions. This app does not just produce recipes; it provides three different meal plans for you to choose from. Particularly, a script in Python code handled the core of this project with several API calls to the gemini-3-flash-preview. Anytime a person runs this app with the image included, it hits the API to generate the necessary meal outputs. The API key was hidden in an environment variable to secure it, and the Google Generative AI Client libraries were installed as dependencies. Briefly, the script takes the image input by a user and sends it to the model, which then identifies the details to map to full meal recipes.

Demo

Google Gemini provided a stock open fridge photo for use in the testing phase of the app. Running the app with the stock photo gave the following meal plans:

Probing maintained

A different image of an open refrigerator filled with farm produce was also used, which gave the output below:

Testing continued

A third image of a fridge half-full with fewer ingredients than the previous responded with the below:

Scrutiny ongoing

What I Learned

Google Gemini provided fast and streamlined access to swiftly transform a question or thought into ideas to hold on to. It also helps in explaining and analyzing code snippets to the user. The follow-up questions were generated and provided with answers by Gemini. The unexpected turn was when the model suggested a deprecated model, which it readily modified to the latest one when asked to explain a mishap in the work. The Gemini AI served as an addition to the startup guide gemini-api/docs/quickstart by summarizing some aspects of it. What dazzled and stayed with me was that an AI Client could be set up with ease with Google Gemini's assistance. In short, the thing I learned about the meal prep co-pilot was that it serves as an everyday tool.

Google Gemini Feedback

Google Gemini made quite profound suggestions for the meal prep app, as listed:
-A history section
-A search for previous meals interface
-Ideas for another app

It also developed insights into the flash generative AI model used in this work by stating that the model can detect the food items in the images provided to deduce their quantity, whether half-empty or almost full, to prioritize which recipes from its stores of data to show to the user, which saves ample time. Concerning errors, the deprecated gemini-2.0-flash I used initially in this work, which hit a limit: 0 when running the app. This created friction and was promptly corrected by cross-checking the start-up documentation that Gemini might have overlooked. Gemini always kept on adding more perspectives to improve the app.

Conclusion

Working with Gemini to build a project was as stepwise as it was educational. Currently, I am optimizing it to a web version suitable for use on Cloud Run. The future of this project, as implied by Gemini, is to tailor the meal prep to serve as outputs for a Keto diet or a Vegan dish inclusive. Even more, to put the folder that houses the images into Google Cloud Storage.
The git repository can be viewed here https://github.com/KathleenCode/fridge-prep

Top comments (0)