Build a Multi-Modal GenAI Application: Challenge Lab
Laboratorium
15 godz.
universal_currency_alt
Bezpłatnie
show_chart
Wprowadzające
info
Ten moduł może zawierać narzędzia AI, które ułatwią Ci naukę.
Te treści nie są jeszcze zoptymalizowane pod kątem urządzeń mobilnych.
Dla maksymalnej wygody odwiedź nas na komputerze, korzystając z linku przesłanego e-mailem.

Overview
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! Are you ready for the challenge?
- Labs are timed and cannot be paused. The timer starts when you click Start Lab.
- The included IDE is preconfigured with the gcloud SDK.
- Use the terminal to execute commands and then click Check my progress to verify your work.
Challenge scenario
Scenario: You're a developer at an AI-powered bouquet design company. Your clients can describe their dream bouquet, and your system generates realistic images for their approval. To further enhance the experience, you're integrating cutting-edge image analysis to provide descriptive summaries of the generated bouquets. Your main application will invoke the relevant methods based on the users' interaction and to facilitate that, you need to finish the below tasks:
Task 1: Develop a Python code using genai.Client(). This client should invoke the model using the supplied content, generate the image, and store it locally. For this challenge, use the prompt: Create an image containing a bouquet of 2 sunflowers and 3 roses.
Note: You can ignore any warnings related to Python version dependencies.
Click Check my progress to verify the objective.
Send a text prompt requests to GenAI and generate an Image
Task 2: Develop a second Python function called analyze_bouquet_image(image_path). This function should take the image path as input and send the image along with a text prompt to the model to generate birthday wishes inspired by the bouquet image.
To ensure responses can be received as soon as they are generated, enable streaming on the prompt request.
As the model generates the response, the function should capture the streamed output and save the complete generated birthday message into a .txt file (e.g., birthday_wishes.txt) using Python code.
Note: You can ignore any warnings related to Python version dependencies.
Note: If you experience a 429 error, wait for a minute and re-run the command.
Click Check my progress to verify the objective.
Analyze the saved image by using a multimodal model
Congratulations!
You have completed the lab! Congratulations!!
Copyright 2026 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.