Custom Components GalleryNEW
ExploreCustom Components GalleryNEW
ExploreNew to Gradio? Start here: Getting Started
See the Release History
gradio.State(ยทยทยท)
As input component: Passes a value of arbitrary type through.
Your function should accept one of these types:
def predict(
value: Any
)
...
As output component: Expects a value of arbitrary type, as long as it can be deepcopied.
Your function should return one of these types:
def predict(ยทยทยท) -> Any
...
return value
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. |