text stringlengths 0 2k | heading1 stringlengths 3 79 | source_page_url stringclasses 189
values | source_page_title stringclasses 189
values |
|---|---|---|---|
n'. Input arguments for js
method are values of 'inputs' and 'outputs', return should be a list of values
for output components.
concurrency_limit: int | None | Literal['default']
default `= "default"`
If set, this is the maximum number of this event that can be running
simultaneously. Can be set to N... | Event Listeners | https://gradio.app/docs/gradio/timer | Gradio - Timer Docs |
essfully will the main function be called. The validator
receives the same inputs as the main function and should return a
`gr.validate()` for each input value.
[More Blocks Features](../../guides/more-blocks-features/)[Time
Plots](../../guides/time-plots/)
| Event Listeners | https://gradio.app/docs/gradio/timer | Gradio - Timer Docs |
Creates a file component that allows uploading one or more generic files
(when used as an input) or displaying generic files or URLs for download (as
output).
Demo: zip_files, zip_to_json
| Description | https://gradio.app/docs/gradio/file | Gradio - File Docs |
**Using File as an input component.**
How File will pass its value to your function:
Type: `bytes | str | list[bytes] | list[str] | None`
Passes the file as a `str` or `bytes` object, or a list of `str` or list of
`bytes` objects, depending on `type` and `file_count`.
Example Code
import... | Behavior | https://gradio.app/docs/gradio/file | Gradio - File Docs |
Parameters ▼
value: str | list[str] | Callable | None
default `= None`
Default file(s) to display, given as a str file path or URL, or a list of str
file paths / URLs. If a function is provided, the function will be called each
time the app loads to set the initial value of this component.
... | Initialization | https://gradio.app/docs/gradio/file | Gradio - File Docs |
er whose tick resets `value`, or a float
that provides the regular interval for the reset Timer.
inputs: Component | list[Component] | set[Component] | None
default `= None`
Components that are used as inputs to calculate `value` if `value` is a
function (has no effect otherwise). `value` is recalcula... | Initialization | https://gradio.app/docs/gradio/file | Gradio - File Docs |
visible: bool | Literal['hidden']
default `= True`
If False, component will be hidden. If "hidden", component will be visually
hidden and not take up space in the layout but still exist in the DOM
elem_id: str | None
default `= None`
An optional string that is assigned as the id of this ... | Initialization | https://gradio.app/docs/gradio/file | Gradio - File Docs |
Shortcuts
gradio.File
Interface String Shortcut `"file"`
Initialization Uses default values
gradio.Files
Interface String Shortcut `"files"`
Initialization Uses file_count="multiple"
| Shortcuts | https://gradio.app/docs/gradio/file | Gradio - File Docs |
Description
Event listeners allow you to respond to user interactions with the UI
components you've defined in a Gradio Blocks app. When a user interacts with
an element, such as changing a slider value or uploading an image, a function
is called.
Supported Event Listeners
The File component supports the following e... | Event Listeners | https://gradio.app/docs/gradio/file | Gradio - File Docs |
ded file
as a FileData object. See EventData documentation on how to use this event
data
Event Parameters
Parameters ▼
fn: Callable | None | Literal['decorator']
default `= "decorator"`
the function to call when this event is triggered. Often a machine learning
model's prediction function. Each para... | Event Listeners | https://gradio.app/docs/gradio/file | Gradio - File Docs |
n completion
show_progress: Literal['full', 'minimal', 'hidden']
default `= "full"`
how to show the progress animation while event is running: "full" shows a
spinner which covers the output component area as well as a runtime display in
the upper right corner, "minimal" only shows the runtime display,... | Event Listeners | https://gradio.app/docs/gradio/file | Gradio - File Docs |
o the browser.
cancels: dict[str, Any] | list[dict[str, Any]] | None
default `= None`
A list of other events to cancel when this listener is triggered. For example,
setting cancels=[click_event] will cancel the click_event, where click_event
is the return value of another components .click method. Fun... | Event Listeners | https://gradio.app/docs/gradio/file | Gradio - File Docs |
isibility: Literal['public', 'private', 'undocumented']
default `= "public"`
controls the visibility and accessibility of this endpoint. Can be "public"
(shown in API docs and callable by clients), "private" (hidden from API docs
and not callable by the Gradio client libraries), or "undocumented" (hidden
from API doc... | Event Listeners | https://gradio.app/docs/gradio/file | Gradio - File Docs |
Creates a navigation bar component for multipage Gradio apps. The navbar
component allows customizing the appearance of the navbar for that page. Only
one Navbar component can exist per page in a Blocks app, and it can be placed
anywhere within the page.
The Navbar component is designed to control the appearance of t... | Description | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
**Using Navbar as an input component.**
How Navbar will pass its value to your function:
Type: `list[tuple[str, str]] | None`
The preprocessed input data sent to the user's function in the backend.
Example Code
import gradio as gr
def predict(
value: list[tuple[s... | Behavior | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
Parameters ▼
value: list[tuple[str, str]] | None
default `= None`
If a list of tuples of (page_name, page_path) are provided, these additional
pages will be added to the navbar alongside the existing pages defined in the
Blocks app. The page_path can be either a relative path for internal Gradio
app p... | Initialization | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
Shortcuts
gradio.Navbar
Interface String Shortcut `"navbar"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
Description
Event listeners allow you to respond to user interactions with the UI
components you've defined in a Gradio Blocks app. When a user interacts with
an element, such as changing a slider value or uploading an image, a function
is called.
Supported Event Listeners
The Navbar component supports the following... | Event Listeners | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
the API docs. Can be a string or None. If
set to a string, the endpoint will be exposed in the API docs with the given
name. If None (default), the name of the function will be used as the API
endpoint.
api_description: str | None | Literal[False]
default `= None`
Description of the API endpoint. Can... | Event Listeners | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
e`). The function is then
*required* to return a tuple of lists (even if there is only 1 output
component), with each list in the tuple corresponding to one output component.
max_batch_size: int
default `= 4`
Maximum number of inputs to batch together if this is called from the queue
(only relevant if... | Event Listeners | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
es
for output components.
concurrency_limit: int | None | Literal['default']
default `= "default"`
If set, this is the maximum number of this event that can be running
simultaneously. Can be set to None to mean no concurrency_limit (any number of
this event can be running simultaneously). Set to "defa... | Event Listeners | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
and should return a
`gr.validate()` for each input value.
[Multipage Apps](../../guides/multipage-apps/)
| Event Listeners | https://gradio.app/docs/gradio/navbar | Gradio - Navbar Docs |
Creates a checkbox that can be set to `True` or `False`. Can be used as an
input to pass a boolean value to a function or as an output to display a
boolean value.
| Description | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
**Using Checkbox as an input component.**
How Checkbox will pass its value to your function:
Type: `bool | None`
Passes the status of the checkbox as a `bool`.
Example Code
import gradio as gr
def predict(
value: bool | None
):
process value f... | Behavior | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
Parameters ▼
value: bool | Callable
default `= False`
if True, checked by default. If a function is provided, the function will be
called each time the app loads to set the initial value of this component.
label: str | I18nData | None
default `= None`
the label for this checkbox, dis... | Initialization | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
ue results in this Component being narrower than
min_width, the min_width parameter will be respected first.
interactive: bool | None
default `= None`
if True, this checkbox can be checked; if False, checking will be disabled. If
not provided, this is inferred based on whether the component is used as... | Initialization | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
ues
provided during constructor.
buttons: list[Button] | None
default `= None`
A list of gr.Button() instances to show in the top right corner of the
component. Custom buttons will appear in the toolbar with their configured
icon and/or label, and clicking them will trigger any .click() events
registe... | Initialization | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
Shortcuts
gradio.Checkbox
Interface String Shortcut `"checkbox"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
sentence_builderhello_world_3
| Demos | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
Description
Event listeners allow you to respond to user interactions with the UI
components you've defined in a Gradio Blocks app. When a user interacts with
an element, such as changing a slider value or uploading an image, a function
is called.
Supported Event Listeners
The Checkbox component supports the followi... | Event Listeners | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
of gradio.components to use as inputs. If the function takes no inputs,
this should be an empty list.
outputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gradio.components to use as outputs. If the function returns no
outp... | Event Listeners | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
request on the queue, if the queue has been enabled.
If False, will not put this event on the queue, even if the queue has been
enabled. If None, will use the queue setting of the gradio app.
batch: bool
default `= False`
If True, then the function should process a batch of inputs, meaning that it
sh... | Event Listeners | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
event is pending. If set to "multiple", unlimited
submissions are allowed while pending, and "always_last" (default for
`.change()` and `.key_up()` events) would allow a second submission after the
pending event is complete.
js: str | Literal[True] | None
default `= None`
Optional frontend js method t... | Event Listeners | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
be used in @gr.render(). If set, this
value identifies an event as identical across re-renders when the key is
identical.
validator: Callable | None
default `= None`
Optional validation function to run before the main function. If provided,
this function will be executed first with queue=False, and on... | Event Listeners | https://gradio.app/docs/gradio/checkbox | Gradio - Checkbox Docs |
Creates a plot component to display various kinds of plots (matplotlib,
plotly, altair, or bokeh plots are supported). As this component does not
accept user input, it is rarely used as an input component.
| Description | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
**Using Plot as an input component.**
How Plot will pass its value to your function:
Type: `PlotData | None`
(Rarely used) passes the data displayed in the plot as an PlotData dataclass,
which includes the plot information as a JSON string, as well as the type of
chart and the plotting library.
Example Code
... | Behavior | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
Parameters ▼
value: Any | None
default `= None`
Optionally, supply a default plot object to display, must be a matplotlib,
plotly, altair, or bokeh figure, or a callable. If a function is provided, the
function will be called each time the app loads to set the initial value of
this component.
... | Initialization | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
to top-level Components
in Blocks where fill_height=True.
min_width: int
default `= 160`
minimum pixel width, will wrap if not sufficient screen space to satisfy this
value. If a certain scale value results in this Component being narrower than
min_width, the min_width parameter will be respected firs... | Initialization | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
g constructor.
buttons: list[Button] | None
default `= None`
A list of gr.Button() instances to show in the top right corner of the
component. Custom buttons will appear in the toolbar with their configured
icon and/or label, and clicking them will trigger any .click() events
registered on the button.... | Initialization | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
Shortcuts
gradio.Plot
Interface String Shortcut `"plot"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
blocks_kinematicsstock_forecast
| Demos | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
Description
Event listeners allow you to respond to user interactions with the UI
components you've defined in a Gradio Blocks app. When a user interacts with
an element, such as changing a slider value or uploading an image, a function
is called.
Supported Event Listeners
The Plot component supports the following e... | Event Listeners | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
PI docs. Can be a string or None. If
set to a string, the endpoint will be exposed in the API docs with the given
name. If None (default), the name of the function will be used as the API
endpoint.
api_description: str | None | Literal[False]
default `= None`
Description of the API endpoint. Can be a ... | Event Listeners | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
he function is then
*required* to return a tuple of lists (even if there is only 1 output
component), with each list in the tuple corresponding to one output component.
max_batch_size: int
default `= 4`
Maximum number of inputs to batch together if this is called from the queue
(only relevant if batch... | Event Listeners | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
output components.
concurrency_limit: int | None | Literal['default']
default `= "default"`
If set, this is the maximum number of this event that can be running
simultaneously. Can be set to None to mean no concurrency_limit (any number of
this event can be running simultaneously). Set to "default" t... | Event Listeners | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
ould return a
`gr.validate()` for each input value.
[Plot Component For Maps](../../guides/plot-component-for-maps/)
| Event Listeners | https://gradio.app/docs/gradio/plot | Gradio - Plot Docs |
This class is a wrapper over the Dataset component and can be used to
create Examples for Blocks / Interfaces. Populates the Dataset component with
examples and assigns event listener so that clicking on an example populates
the input/output components. Optionally handles example caching for fast
inference.
| Description | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
Parameters ▼
examples: list[Any] | list[list[Any]] | str
example inputs that can be clicked to populate specific components. Should be
nested list, in which the outer list consists of samples and each inner list
consists of an input corresponding to each input component. A string path to a
directory of... | Initialization | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
d in Gradio's
UI for cached examples.
cache_mode: Literal['eager', 'lazy'] | None
default `= None`
if "lazy", examples are cached after their first use. If "eager", all examples
are cached at app launch. If None, will use the GRADIO_CACHE_MODE environment
variable if defined, or default to "eager".
... | Initialization | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
ow the event associated with clicking on the examples appears in the
API docs. Can be a string or None. If set to a string, the endpoint will be
exposed in the API docs with the given name. If None, an auto-generated name
will be used.
api_description: str | None | Literal[False]
default `= None`
Desc... | Initialization | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
Parameters ▼
dataset: gradio.Dataset
The `gr.Dataset` component corresponding to this Examples object.
load_input_event: gradio.events.Dependency
The Gradio event that populates the input values when the examples are
clicked. You can attach a `.then()` or a `.success()` to this event t... | Attributes | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
**Updating Examples**
In this demo, we show how to update the examples by updating the samples of
the underlying dataset. Note that this only works if `cache_examples=False` as
updating the underlying dataset does not update the cache.
import gradio as gr
def update_examples(country):
i... | Examples | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
calculator_blocks
| Demos | https://gradio.app/docs/gradio/examples | Gradio - Examples Docs |
Displays text that contains spans that are highlighted by category or
numerical value.
| Description | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
**Using HighlightedText as an input component.**
How HighlightedText will pass its value to your function:
Type: `list[tuple[str, str | float | None]] | None`
Passes the value as a list of tuples: `list[tuple]`. Each `tuple` consists of:
* a `str` substring of the text (so the entire text is included)
* a `str... | Behavior | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
Parameters ▼
value: list[tuple[str, str | float | None]] | dict | Callable | None
default `= None`
Default value to show. If a function is provided, the function will be called
each time the app loads to set the initial value of this component.
color_map: dict[str, str] | None
default... | Initialization | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
inputs: Component | list[Component] | set[Component] | None
default `= None`
Components that are used as inputs to calculate `value` if `value` is a
function (has no effect otherwise). `value` is recalculated any time the
inputs change.
show_label: bool | None
default `= None`
if True, will displa... | Initialization | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
he intention is to assign event listeners now but render the
component later.
key: int | str | tuple[int | str, ...] | None
default `= None`
in a gr.render, Components with the same key across re-renders are treated as
the same component, not a new component. Properties set in 'preserved_by_key'
are n... | Initialization | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
Shortcuts
gradio.HighlightedText
Interface String Shortcut `"highlightedtext"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
diff_texts
| Demos | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
Description
Event listeners allow you to respond to user interactions with the UI
components you've defined in a Gradio Blocks app. When a user interacts with
an element, such as changing a slider value or uploading an image, a function
is called.
Supported Event Listeners
The HighlightedText component supports the ... | Event Listeners | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
puts,
this should be an empty list.
outputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gradio.components to use as outputs. If the function returns no
outputs, this should be an empty list.
api_name: str | ... | Event Listeners | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
l not put this event on the queue, even if the queue has been
enabled. If None, will use the queue setting of the gradio app.
batch: bool
default `= False`
If True, then the function should process a batch of inputs, meaning that it
should accept a list of input values for each parameter. The lists sh... | Event Listeners | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
llowed while pending, and "always_last" (default for
`.change()` and `.key_up()` events) would allow a second submission after the
pending event is complete.
js: str | Literal[True] | None
default `= None`
Optional frontend js method to run before running 'fn'. Input arguments for js
method are values... | Event Listeners | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
identical across re-renders when the key is
identical.
validator: Callable | None
default `= None`
Optional validation function to run before the main function. If provided,
this function will be executed first with queue=False, and only if it
completes successfully will the main function be called. T... | Event Listeners | https://gradio.app/docs/gradio/highlightedtext | Gradio - Highlightedtext Docs |
Accordion is a layout element which can be toggled to show/hide the
contained content.
| Description | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
with gr.Accordion("See Details"):
gr.Markdown("lorem ipsum")
| Example Usage | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
Parameters ▼
label: str | I18nData | None
default `= None`
name of accordion section.
open: bool
default `= True`
if True, accordion is open by default.
visible: bool | Literal['hidden']
default `= True`
elem_id: str | None
default `= None`
An optio... | Initialization | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
Methods | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs | |
%20Copyright%202022%20Fonticons,%20Inc.... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
c!--!%20Font%20Awesome%20Pro%206.0.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20\(Commercial%20License\)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M172.5%20131.1C228.1%2075.51%20320.5%2075.51%20376.1%20131.1C426.1%20181.1%20433.5%20260.8%20392.4%... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
onds to one
input component, and the function should return a single value or a tuple of
values, with each element in the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gradi... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
ion at all
show_progress_on: Component | list[Component] | None
default `= None`
Component or list of components to show the progress animation on. If None,
will show the progress animation on all of the output components.
queue: bool
default `= True`
If True, will place the request ... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
enerators that are iterating) will be cancelled, but
functions that are currently running will be allowed to finish.
trigger_mode: Literal['once', 'multiple', 'always_last'] | None
default `= None`
If "once" (default for all events except `.change()`) would not allow any
submissions while an event is ... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
gr.load). If fn is None,
api_visibility will automatically be set to "private".
time_limit: int | None
default `= None`
stream_every: float
default `= 0.5`
key: int | str | tuple[int | str, ...] | None
default `= None`
A unique key for this event listener to be used i... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
%3c!--!%20Font%20Awesome%20Pro%206.0.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20\(Commercial%20License\)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M172.5%20131.1C228.1%2075.51%20320.5%2075.51%20376.1%20131.1C426.1%20181.1%20433.5%20260.8%20392.... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
esponds to one
input component, and the function should return a single value or a tuple of
values, with each element in the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gr... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
mation at all
show_progress_on: Component | list[Component] | None
default `= None`
Component or list of components to show the progress animation on. If None,
will show the progress animation on all of the output components.
queue: bool
default `= True`
If True, will place the reque... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
r generators that are iterating) will be cancelled, but
functions that are currently running will be allowed to finish.
trigger_mode: Literal['once', 'multiple', 'always_last'] | None
default `= None`
If "once" (default for all events except `.change()`) would not allow any
submissions while an event ... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
ia gr.load). If fn is None,
api_visibility will automatically be set to "private".
time_limit: int | None
default `= None`
stream_every: float
default `= 0.5`
key: int | str | tuple[int | str, ...] | None
default `= None`
A unique key for this event listener to be use... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
c!--!%20Font%20Awesome%20Pro%206.0.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20\(Commercial%20License\)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M172.5%20131.1C228.1%2075.51%20320.5%2075.51%20376.1%20131.1C426.1%20181.1%20433.5%20260.8%20392.4%... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
onds to one
input component, and the function should return a single value or a tuple of
values, with each element in the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gradi... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
ion at all
show_progress_on: Component | list[Component] | None
default `= None`
Component or list of components to show the progress animation on. If None,
will show the progress animation on all of the output components.
queue: bool
default `= True`
If True, will place the request ... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
enerators that are iterating) will be cancelled, but
functions that are currently running will be allowed to finish.
trigger_mode: Literal['once', 'multiple', 'always_last'] | None
default `= None`
If "once" (default for all events except `.change()`) would not allow any
submissions while an event is ... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
gr.load). If fn is None,
api_visibility will automatically be set to "private".
time_limit: int | None
default `= None`
stream_every: float
default `= 0.5`
key: int | str | tuple[int | str, ...] | None
default `= None`
A unique key for this event listener to be used i... | expand | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
%3c!--!%20Font%20Awesome%20Pro%206.0.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20\(Commercial%20License\)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M172.5%20131.1C228.1%2075.51%20320.5%2075.51%20376.1%20131.1C426.1%20181.1%20433.5%20260.8%20392.... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
esponds to one
input component, and the function should return a single value or a tuple of
values, with each element in the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None
default `= None`
List of gr... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
mation at all
show_progress_on: Component | list[Component] | None
default `= None`
Component or list of components to show the progress animation on. If None,
will show the progress animation on all of the output components.
queue: bool
default `= True`
If True, will place the reque... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
r generators that are iterating) will be cancelled, but
functions that are currently running will be allowed to finish.
trigger_mode: Literal['once', 'multiple', 'always_last'] | None
default `= None`
If "once" (default for all events except `.change()`) would not allow any
submissions while an event ... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
ia gr.load). If fn is None,
api_visibility will automatically be set to "private".
time_limit: int | None
default `= None`
stream_every: float
default `= 0.5`
key: int | str | tuple[int | str, ...] | None
default `= None`
A unique key for this event listener to be use... | collapse | https://gradio.app/docs/gradio/accordion | Gradio - Accordion Docs |
Tab (or its alias TabItem) is a layout element. Components defined within
the Tab will be visible when this tab is selected tab.
| Description | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
with gr.Blocks() as demo:
with gr.Tab("Lion"):
gr.Image("lion.jpg")
gr.Button("New Lion")
with gr.Tab("Tiger"):
gr.Image("tiger.jpg")
gr.Button("New Tiger")
| Example Usage | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
Parameters ▼
label: str | I18nData | None
default `= None`
The visual label for the tab
visible: bool | Literal['hidden']
default `= True`
If False, Tab will be hidden.
interactive: bool
default `= True`
If False, Tab will not be clickable.
id: int |... | Initialization | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
Methods | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs | |
%20Copyright%202022%20Fonticons,%20Inc.... | select | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
20Font%20Awesome%20Pro%206.0.0%20by%20@fontawesome%20-%20https://fontawesome.com%20License%20-%20https://fontawesome.com/license%20\(Commercial%20License\)%20Copyright%202022%20Fonticons,%20Inc.%20--%3e%3cpath%20d='M172.5%20131.1C228.1%2075.51%20320.5%2075.51%20376.1%20131.1C426.1%20181.1%20433.5%20260.8%20392.4%20318.... | select | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
le | None | Literal['decorator']
default `= "decorator"`
the function to call when this event is triggered. Often a machine learning
model's prediction function. Each parameter of the function corresponds to one
input component, and the function should return a single value or a tuple of
values, with each element in ... | select | https://gradio.app/docs/gradio/tab | Gradio - Tab Docs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.