Checkbox with Gradio

Learn how to include checkboxes in Gradio applications and the many ways to interact with them.

Checkbox

A common UI element is a Checkbox, allowing the user to toggle between True or False. To instantiate a Checkbox, we type: gr.Checkbox().

A Checkbox can only take on a boolean value (True or False). If it is passed as an input into a function, it will pass the status of the Checkbox as a boolean. As an output, it expects a boolean returned from the function, and if True will check the checkbox.

Get hands-on with 1300+ tech skills courses.