Utils
- graphbook.utils.image(path_or_pil: str | Image) dict
A simple helper function to create a Graphbook-recognizable image object. A path to an image file or a PIL Image object is supported for rendering in the UI. If the image is a PIL Image object, Graphbook will attempt to store it in a shared memory region if the feature is enabled. If shared memory is disabled, PIL Image objects will not be rendered in the UI.
- Parameters:
path_or_pil (str | Image.Image) – A path to an image file or a PIL Image object.