CheckboxGroup with Gradio
Explore how to implement the CheckboxGroup component in Gradio for selecting multiple options in a user interface. Understand how to assign event listeners and use them to filter data dynamically, demonstrated with a property listing example. Gain practical skills to enhance interactivity in your machine learning applications.
We'll cover the following...
The CheckboxGroup class
Sometimes, we need a checkbox that has multiple options, rather than just a toggle between True and False. For example, if we wanted to create a group of checkboxes where users can select multiple items to be true (e.g. tick all foods that the user likes), it would be too cumbersome to define a checkbox for each item.
A CheckboxGroup in Gradio creates a set of checkboxes, from which a subset can be selected. We can instantiate a CheckboxGroup as follows:
gr.CheckboxGroup()or with theInterfacestring shortcut'checkboxgroup'
If it is passed as an ...