Challenge 6: Generating images
Introduction
Now we have product descriptions, we can generate images based on these descriptions using GenAI. This will involve running a Vertex AI Pipeline to orchestrate a few things, such as iterating over the data, preparing the prompt based on the product description, running Imagen to generate the images, pick one of the results (randomly), store the image in Cloud Storage and record the URI in BigQuery.
Description
Create a new Cloud Storage bucket and name it {YOUR PROJECT ID}-images
. Update the BigQuery products
table to include image_uri
and image_url
columns.
We’ve already prepared the code for a Vertex AI Pipeline, download it from here and install its dependencies. Then run the code, it will create a yaml
file. Navigate to Vertex AI Pipelines and Create run with that yaml
file, provide the required parameters and submit the job.
Success Criteria
- There’s a new Cloud Storage bucket called
{YOUR PROJECT ID}-images
. - The BigQuery
products
table has the new columnsimage_uri
andimage_url
. - The provided Vertex AI Pipeline has been successfully run.
- There are product images generated for the
products
and the corresponding urls are in the BigQuery table.