gradio.output_maidr

widget.gradio.output_maidr(plot=None, *, use_cdn=None, **kwargs)

Make a gr.HTML component holding an accessible chart.

Parameters

Name Type Description Default
plot Any The chart to show, as for :func:render_maidr. None leaves the component empty, for an event handler to fill with :func:render_maidr. None
use_cdn bool, {"auto"}, or None As for :func:render_maidr. None
**kwargs Any Passed on to gr.HTML, such as label or elem_id. {}

Returns

Name Type Description
gradio.HTML The component, placed where it is made inside gr.Blocks.

Raises

Name Type Description
ImportError If Gradio is not installed.

Examples

>>> import gradio as gr
>>> from maidr.widget.gradio import output_maidr
>>>
>>> with gr.Blocks() as demo:
...     output_maidr(fig)