What's New in Gradio 4.0?

Watch

Custom ComponentsNEW

Guides

New to Gradio? Start here: Getting Started

See the Release History

State

gradio.State(···)

Description

A base class for defining methods that all input/output components should have.

Behavior

As input: undefined

As output: undefined

Initialization

Parameter Description
value

Any

default: None

the initial value (of arbitrary type) of the state. The provided argument is deepcopied. If a callable is provided, the function will be called whenever the app loads to set the initial value of the state.

render

bool

default: True

has no effect, but is included for consistency with other components.