Skip to content

docs: Add image loading code to multimodal example#530

Open
KanishqGandharv219 wants to merge 1 commit intogoogle-deepmind:mainfrom
KanishqGandharv219:main
Open

docs: Add image loading code to multimodal example#530
KanishqGandharv219 wants to merge 1 commit intogoogle-deepmind:mainfrom
KanishqGandharv219:main

Conversation

@KanishqGandharv219
Copy link

@KanishqGandharv219 KanishqGandharv219 commented Feb 3, 2026

Description

Fixes the multimodal example in README by adding missing image loading code.

Problem

The current example uses undefined variables image1 and image2, causing a NameError when users try to run the code.

Solution

  • Added from PIL import Image and import numpy as np imports
  • Added example code showing how to load images and convert to NumPy arrays
  • Matches the format expected by Gemma's ChatSampler (NumPy arrays with uint8 dtype)

Testing

Impact

Makes the example copy-pasteable and executable for new users.

@google-cla
Copy link

google-cla bot commented Feb 3, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants