Buttons with Gradio
Learn about including buttons in Gradio applications, and how to assign actions to the buttons.
We'll cover the following...
The Button component
The usage of a Button is quite self-explanatory. When instantiated, it will create a button, that can be assigned a myriad of arbitrary click events. The button label (or value) can be used as an input or set via the output of a function.
To instantiate a Button, we type gr.Button().
There are different kinds of buttons, such as a clear button, duplicate button, login button, and logout button. These can be instantiated as gr.ClearButton(), gr.DuplicateButton(), gr.LoginButton() and gr.LogoutButton() respectively. They are identical and only differ in the value/label of the button.
Button supports some parameters upon initialization that affect how the button is displayed. The more notable ones include the ...