"""Image understanding (inline bytes) with Gemini."""
from google import genai
from google.genai import types

def main() -> None:
    client = genai.Client()

    with open("image.jpg", "rb") as f:
        image_bytes = f.read()

    resp = client.models.generate_content(
        model="gemini-3-flash-preview",
        contents=[
            types.Part.from_bytes(data=image_bytes, mime_type="image/jpeg"),
            "Caption this image, and list any visible brands.",
        ],
    )
    print(resp.text)

if __name__ == "__main__":
    main()
