
Before you begin
- Labs create a Google Cloud project and resources for a fixed time
- Labs have a time limit and no pause feature. If you end the lab, you'll have to restart from the beginning.
- On the top left of your screen, click Start lab to begin
Use cURL to test sample prompts with the API
/ 15
Write Streamlit framework code for the user interface
/ 25
Test the application in Cloud Shell
/ 20
Modify the Dockerfile and push the Docker image to the Artifact Registry
/ 20
Deploy the application to Cloud Run and test it
/ 20
In a challenge lab you’re given a scenario and a set of tasks. Instead of following step-by-step instructions, you will use the skills learned from the labs in the course to figure out how to complete the tasks on your own! An automated scoring system (shown on this page) will provide feedback on whether you have completed your tasks correctly.
When you take a challenge lab, you will not be taught new Google Cloud concepts. You are expected to extend your learned skills, like changing default values and reading and researching error messages to fix your own mistakes.
To score 100% you must successfully complete all tasks within the time period!
This lab is recommended for students who enrolled in the Develop GenAI Apps with Gemini and Streamlit course. Are you ready for the challenge?
Read these instructions. Labs are timed and you cannot pause them. The timer, which starts when you click Start Lab, shows how long Google Cloud resources are made available to you.
This hands-on lab lets you do the lab activities in a real cloud environment, not in a simulation or demo environment. It does so by giving you new, temporary credentials you use to sign in and access Google Cloud for the duration of the lab.
To complete this lab, you need:
You onboarded at Cymbal Health just a few months ago. Cymbal Health is an established health network in East Central Minnesota dedicated to reimagining and transforming the way that healthcare can be delivered. Cymbal Health connects care and coverage under one health plan to make it easier for patients to receive high quality care at an affordable cost.
As a value added service, Cymbal Health is interested in improving customer Healthy Living and Wellness, with tips, and advice within apps. One particular area they want to focus on is improving customer nutrition.
By harnessing the power of the Gemini, a multimodal model for generating text, audio, images, and video, Cymbal Health can build applications that generate meal recommendations for its customers.
As an example, your team has been working to create a AI-Based Chef app, that generates recipes based upon customer cuisine preferences, dietary restrictions, food allergies, and what they typically have in their homes or can purchase at a grocery store. Your job is to build, test and deploy a Proof Of Concept (POC) for this Chef app built on the Gemini model, Streamlit framework, and Cloud Run. As part of this POC, they have a list of tasks they would like to see you do in an allotted period of time in a sandbox environment.
Your tasks include the following:
chef.py
Before you can begin to create the Chef app in Vertex AI, you should test connectivity with the Gemini API.
In the Google Cloud console, on the Navigation menu (), click Vertex AI > Workbench.
Find the
The JupyterLab interface for your Workbench instance opens in a new browser tab.
From the left hand menu, modify prompt.ipynb
to include your project_ID and region within cell 3. You can get these in the left panel of the lab instructions.
From the left hand menu, modify prompt.ipynb
to use the following prompt with cURL within cell 5, by replacing the existing prompt.
Run all cells and observe the results.
Save prompt.ipynb
.
Once you are satisfied with the results, verify the objective.
To verify the objective, click Check my progress.
For this task you will clone a GitHub repo, and download the chef.py
file. Then you will add Streamlit framework code in the chef.py
file for the wine preference, to complete the user interface for the application. You will also include a custom Gemini prompt (similar to the one in task 1), but this one includes variables.
Using Cloud Shell clone the repo below from the default directory.
Navigate to the gemini-streamlit-cloudrun
directory.
Specify the dependencies in the requirements.txt file:
chef.py
file here and make changes to it here, it will not be able to access the Streamlit framework. You will also not be able to test it in Cloud Shell (Task 3), or build the docker container (Task 4), and deploy then test it Cloud Run (Task 5).
Download the chef.py
file using the following command.
Open the chef.py file in the Cloud Shell Editor and review the code.
For Project ID, use
Add Streamlit framework radio button option for the wine variable. Include options for Red, White and None.
Save the chef.py
file.
Add the new Gemini prompt below in Python code.
Save the chef.py
file.
Once you are satisfied with the Gemini prompt code you added in chef.py
, upload the file to
To verify the objective, click Check my progress.
chef.py
file. So that the updated chef.py
file is present in the bucket.For this task you will use the terminal in Cloud Shell to run and test your application.
Make sure your are still in this path, generative-ai/gemini/sample-apps/gemini-streamlit-cloudrun
.
Setup the python virtual environment and install the dependencies.
Set environment variables for PROJECT (as your Project ID) and REGION (as the region you are using in the lab environment).
Run the chef.py
application and test it.
Once you tested the application in Cloud Shell and confirmed it is performing as designed, without errors, verify the objective.
To verify the objective, click Check my progress.
In this task you modify the sample Dockerfile
to use your chef.py
file and push the Docker image to the Artifact Registry.
Use the Cloud Shell editor to modify the Dockerfile to use chef.py
, then save the file.
In Cloud Shell set the following environment variables.
Variable | Value |
---|---|
AR_REPO | chef-repo |
SERVICE_NAME | chef-streamlit-app |
Create the Artifact Registry repository with the gcloud artifacts repositories create
command and the following parameters.
Parameter | Value |
---|---|
repo name | $AR_REPO |
location | $REGION |
repository format | Docker |
Submit the build with the gcloud builds submit
command and the following parameters.
Parameter | Value |
---|---|
tag | "$REGION-docker.pkg.dev/$PROJECT/$AR_REPO/$SERVICE_NAME" |
Wait for the command to complete.
Once the command is complete, verify the objective.
To verify the objective, click Check my progress.
In this task you deploy the application (as a Docker Artifact) to Cloud Run and then test the application as running from the Cloud Run service endpoint.
In Cloud Shell deploy the application (as a Docker Artifact), using gcloud run deploy
command and the following parameter values:
Parameter | Value |
---|---|
port | 8080 |
image | "$REGION-docker.pkg.dev/$PROJECT/$AR_REPO/$SERVICE_NAME" |
flag | --allow-unauthenticated |
region | REGION |
platform | managed |
project | PROJECT |
set-env-vars | PROJECT=$PROJECT,REGION=$REGION |
The deployment will take a few minutes to complete and you will be provided a URL to the Cloud Run service. You can visit that in the browser to view the Cloud Run application that you just deployed.
Test the application with the link provided.
Once you successfully tested the application running on Cloud Run, verify the objective.
To verify the objective, click Check my progress.
By completing this challenge lab, you verified your skills with Gen AI application development with Gemini and how you can apply these to AI based chef application.
...helps you make the most of Google Cloud technologies. Our classes include technical skills and best practices to help you get up to speed quickly and continue your learning journey. We offer fundamental to advanced level training, with on-demand, live, and virtual options to suit your busy schedule. Certifications help you validate and prove your skill and expertise in Google Cloud technologies.
Manual Last Updated May 28, 2025
Lab Last Tested May 28, 2025
Copyright 2025 Google LLC. All rights reserved. Google and the Google logo are trademarks of Google LLC. All other company and product names may be trademarks of the respective companies with which they are associated.
This content is not currently available
We will notify you via email when it becomes available
Great!
We will contact you via email if it becomes available
One lab at a time
Confirm to end all existing labs and start this one