How to display Image in WEB UI
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 267
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 9
Description
How to display Image in WEBUI
I have before model callback that cuts the circuit and responds with LlmResponse. i tried both from_bytes and inline-data. Both display empty message. I am able to save the image locally. I am able to save the image in artifact service and it is then displayed in WEB UI.
return LlmResponse(
content=types.Content(
role="model",
parts=[
types.Part(text=f"✅ Here is the QR code for: '{text_for_qrcode}'"),
types.Part.from_bytes(
mime_type='image/png;base64',
data=base64_string
),
types.Part(inline_data=types.Blob(
data=base64_string,
mime_type="image/png;base64",
display_name="qrcode"
)
)
]
)
)
Contributor guide
Assessment
This issue has not been assessed yet.