Welcome to the culinary transformation fueled by Gemini AI – your brand-new kitchen companion! Nowadays, we’re plunging into the energizing world of keen cooking, where snapping a picture of your fixings changes into a delightful cooking enterprise. Let’s unwind the enchantment of Gemini AI, making your time in the kitchen more pleasant and tasty!
This article was published as a part of the Data Science Blogathon.
Envision having a virtual sous chef who gets your fixings and makes personalized formulas fair for you. Gemini AI acts like a virtual chef in your kitchen. It understands your ingredients and tailors recipes just for you. No need for technical jargon – just straightforward and enjoyable cooking.
That’s the power of Gemini AI. It’s like a friendly kitchen wizard here to assist you. Follow these simple steps to join the culinary fun:
Getting started with Gemini AI is as simple as following a recipe. No tech wizardry is required. It’s like downloading your favorite cooking app – fast and hassle-free.
Here’s a step-by-step direction:
!pip install -U -q google-generativeai
# Install the client library and import necessary modules.
import google.generativeai as genai
import base64
import io
import json
import mimetypes
import pathlib
import pprint
import requests
import PIL.Image
import IPython.display
from IPython.display import Markdown
Forget about complex recipes! With Gemini AI, all you need is a photo of your ingredients. It’s like having a personal chef that decodes your ingredients and suggests delightful recipes!
Before selecting a photo from your drive, it is essential to opt for the Gemini 1.0 Pro Vision model.
from google.colab import drive
drive.mount('/gdrive')
from google.colab import userdata
API_KEY=userdata.get('API_KEY')
genai.configure(api_key=API_KEY)
for content in contents:
for n, part in enumerate(content['parts']):
if image:=part.get('image', None):
if drive_id:=image.get('drive_id', None):
path = next(pathlib.Path(f'/gdrive/.shortcut-targets-by-id/{drive_id}').glob('*'))
data = path.read_bytes()
mime_type, _ = mimetypes.guess_type(path)
elif image_url:=image.get('image_url', None):
response = requests.get(image_url)
data = response.content
mime_type = response.headers['content-type']
else:
raise ValueError('Either drive_id or image_url must be provided.')
if mime_type is None:
# Guess!
mime_type = 'image/png'
blob = {'data': data, 'mime_type': mime_type}
content['parts'][n] = {'inline_data': blob}
import IPython.display
import PIL.Image
import io
for content in contents:
for part in content['parts']:
if text := part.get('text', None):
print(text)
elif data := part.get('inline_data', None):
img = PIL.Image.open(io.BytesIO(data['data']))
img.thumbnail([512,512])
IPython.display.display(img)
print('_'*80)
Say farewell to complex recipes! With Gemini AI, all you need is a photo of your ingredients. It’s like having a personal chef who decodes your ingredients and proposes delightful recipes! The process is streamlined and magical, simplifying your cooking experience.
Gemini AI leverages cutting-edge technology to analyze your ingredient photos, ensuring that the resulting recipes are tailored to your taste buds. No more fretting over intricate instructions – let Gemini AI be your culinary guide, turning every meal into a masterpiece.
Now, let’s explore how Gemini AI accommodates various types of content, from pictures to PDFs, allowing you to create diverse and engaging recipes. The code has been intelligently designed to handle different data formats seamlessly, giving you the flexibility to experiment with your culinary creations.
gemini = genai.GenerativeModel(model_name=model)
response = gemini.generate_content(
contents,
generation_config=generation_config,
safety_settings=safety_settings,
stream=False)
if generation_config.get('candidate_count', 1) == 1:
display(Markdown(response.text))
else:
print(response.candidates)
Our model extends its benefits to a diverse range of individuals within the culinary landscape. Domestic cooks discover important direction and motivation, unraveling the complexities of fixing utilization and investigating modern formulas with ease. Amateur chefs, taking their introductory steps within the kitchen, get comprehensive help and step-by-step enlightening, changing their learning encounter into an agreeable journey. Indeed prepared chefs can use the demonstration as a source of motivation, finding inventive ways to utilize fixings and refine their cooking methods. For nourishment bloggers, the model gets to be an important apparatus, permitting them to supply nitty gritty clarifications and bits of knowledge, upgrading the general quality of their culinary substance. Also, people with particular dietary limitations discover the show especially valuable, because it tailors formulas based on recognized fixings, guaranteeing a personalized and pleasant cooking encounter for all.
Our model excels in providing detailed outputs by expertly analyzing the ingredients captured in a given dish’s picture. Acting as a culinary master, it not as it were distinguishes the components but goes a step encourage to explain their usage within the formula. With a riches of cooking information, the show expresses step-by-step information, directing clients through the cooking handle with accuracy and ability. This guarantees that clients not as it were find the fixings but moreover pick up profitable bits of knowledge into the science behind each culinary creation.
Our model, driven by Gemini 1.0 Pro Vision, proves invaluable in the culinary realm. It accurately recognizes fixings in dish images and offers smart clarifications almost their utilization within the formula. Acting as a learned cooking companion, it gives clear step-by-step information and confers culinary skills, making indeed complex formulas congenial. The user-friendly interface guarantees availability for both prepared chefs and amateurs. Moreover, the model accommodates diverse content types, fostering creativity in culinary creations. In quintessence, it changes cooking into an enlightening and pleasant journey, stamping a significant stride into the end of the culinary investigation.
Our model, driven by Gemini 1.0 Pro Vision, enhances the cooking experience by adeptly explaining the ingredients featured in a given dish through its advanced analysis. Serving as a learned cooking companion, it not only distinguishes the components but moreover confers culinary skills by enumerating their utilization within the formula. With this comprehensive approach, clients are not as it were guided through the cooking preparation but also gain valuable bits of knowledge, making the complete culinary travel more enlightening and pleasant. Grasp the long run of cooking with our model, where understanding and making lovely dishes end up consistently interwoven.
A. Gemini AI enhances cooking experiences by serving as a virtual sous chef, designed to streamline culinary tasks. It rearranges the cooking prepare by analyzing fixings and recommending personalized formulas custom-made to the user’s inclinations.
A. Gemini AI utilizes advanced technology to analyze photos of ingredients provided by users.At that point deciphers these fixings and recommends appropriate formulas based on the investigation. Clients essentially get to snap a photo of their fixings, and Gemini AI does the rest.
A. Yes, Gemini AI is planned to be user-friendly and available to both experienced chefs and kitchen amateurs. It disposes of the requirement for specialized skills within the kitchen, making cooking pleasant and direct for everybody.
A. Yes, Gemini AI can oblige dietary confinements by fitting formulas based on recognized fixings. Whether you’re taking after a particular slim down or have hypersensitivities, Gemini AI can propose appropriate formulas to meet your needs.
A. Gemini AI takes user privacy and data security seriously. It actualizes measures to protect client information and follows industry standards hones for information assurance. Clients can survey the platform’s security approach for more points of interest.
The media shown in this article is not owned by Analytics Vidhya and is used at the Author’s discretion.