text stringlengths 0 2k | heading1 stringlengths 3 79 | source_page_url stringclasses 189
values | source_page_title stringclasses 189
values |
|---|---|---|---|
the labels of components or Markdown strings).
This feature can only be used to translate static text in the frontend, not
values in the backend.
theme: Theme | str | None
default `= None`
A Theme object or a string representing a theme. If a string, will look for a
built-in theme with that name (e.g.... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%3e%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%203... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
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 the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Compo... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
shows the runtime display, "hidden"
shows no progress animation 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.
que... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ponents .click method. Functions that have
not yet run (or 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 `.c... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
nted" (hidden
from API docs but callable by clients and via 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... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
20640%20512'%3e%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... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
/svg'%20fill='%23808080'%20viewBox='0%200%20640%20512'%3e%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%207... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ne object to use.
| from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
e%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... | integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ype | None
default `= None`
If the wandb module is provided, will integrate with it and appear on WandB
dashboard
mlflow: ModuleType | None
default `= None`
If the mlflow module is provided, will integrate with the experiment and
appear on ML Flow dashboard
| integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface 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%2... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ro%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.3L391.3%20319.9C381%... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
send status at regular intervals set by this
parameter as the number of seconds.
api_open: bool | None
default `= None`
If True, the REST routes of the backend will be open, allowing requests made
directly to those endpoints to skip the queue.
max_size: int | None
default `= None`
T... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface 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%... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
2'%3e%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%2... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
pp inline in an iframe. Defaults to True in
python notebooks; False otherwise.
inbrowser: bool
default `= False`
whether to automatically launch the gradio app in a new tab on the default
browser.
share: bool | None
default `= None`
whether to create a publicly shareable link for the... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
an alert modal and
printed in the browser console log. They will also be displayed in the alert
modal of downstream apps that gr.load() this app.
server_name: str | None
default `= None`
to make app accessible on local network, set this to "0.0.0.0". Can be set by
environment variable GRADIO_SERVER_NA... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
inks: list[Literal['api', 'gradio', 'settings', 'runs'] | dict[str, str]] | None
default `= None`
The links to display in the footer of the app. Accepts a list, where each
element of the list must be one of "api", "gradio", "settings", or "runs"
corresponding to the API docs, "built with Gradio", the settings page, a... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
of your app are not allowed to access). Must be absolute
paths. Warning: takes precedence over `allowed_paths` and all other
directories exposed by Gradio by default. Can be set by comma separated
environment variable GRADIO_BLOCKED_PATHS.
root_path: str | None
default `= None`
The root path (or "moun... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
protocol to use for the share links. Defaults to
"https", unless a custom share_server_address is provided, in which case it
defaults to "http". If you are using a custom share_server_address and want to
use https, you must set this to "https".
share_server_tls_certificate: str | None
default `= None`... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
dio server
running on localhost. If False, allows requests to localhost that originate
from localhost but also, crucially, from "null". This parameter should
normally be True to prevent CSRF attacks but may need to be False when
embedding a *locally-running Gradio app* using web components.
node_server_... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
the labels of components or Markdown strings).
This feature can only be used to translate static text in the frontend, not
values in the backend.
theme: Theme | str | None
default `= None`
A Theme object or a string representing a theme. If a string, will look for a
built-in theme with that name (e.g.... | launch | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%3e%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%203... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
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 the tuple corresponding to one output component.
inputs: Component | BlockContext | list[Component | BlockContext] | Set[Compo... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
shows the runtime display, "hidden"
shows no progress animation 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.
que... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ponents .click method. Functions that have
not yet run (or 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 `.c... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
nted" (hidden
from API docs but callable by clients and via 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... | load | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
20640%20512'%3e%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... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
/svg'%20fill='%23808080'%20viewBox='0%200%20640%20512'%3e%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%207... | from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ne object to use.
| from_pipeline | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
e%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... | integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ype | None
default `= None`
If the wandb module is provided, will integrate with it and appear on WandB
dashboard
mlflow: ModuleType | None
default `= None`
If the mlflow module is provided, will integrate with the experiment and
appear on ML Flow dashboard
| integrate | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface 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%2... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
ro%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.3L391.3%20319.9C381%... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
send status at regular intervals set by this
parameter as the number of seconds.
api_open: bool | None
default `= None`
If True, the REST routes of the backend will be open, allowing requests made
directly to those endpoints to skip the queue.
max_size: int | None
default `= None`
T... | queue | https://gradio.app/docs/gradio/interface | Gradio - Interface Docs |
Creates a textarea for users to enter string input or display string output
and also allows for the uploading of multimedia files.
| Description | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
**Using MultimodalTextbox as an input component.**
How MultimodalTextbox will pass its value to your function:
Type: `MultimodalValue | None`
Passes text value and list of file(s) as a `dict` into the function.
Example Code
import gradio as gr
def predict(
value:... | Behavior | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
Parameters ▼
value: str | dict[str, str | list] | Callable | None
default `= None`
Default value to show in MultimodalTextbox. A string value, or a dictionary of
the form {"text": "sample text", "files": [{path: "files/file.jpg", orig_name:
"file.jpg", url: "http://image_url.jpg", size: 100}]}. If a f... | Initialization | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
e`
the label for this component, displayed above the component if `show_label` is
`True` and is also used as the header if there are a table of examples for
this component. If None and used in a `gr.Interface`, the label will be the
name of the parameter this component corresponds to.
info: str | I18nD... | Initialization | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
ected first.
interactive: bool | None
default `= None`
if True, will be rendered as an editable textbox; if False, editing will be
disabled. If not provided, this is inferred based on whether the component is
used as an input or output.
visible: bool | Literal['hidden']
default `= Tru... | Initialization | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
erved_by_key: list[str] | str | None
default `= "value"`
A list of parameters from this component's constructor. Inside a gr.render()
function, if a component is re-rendered with the same key, these (and only
these) parameters will be preserved in the UI (if they have been changed by
the user or an event listener) in... | Initialization | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
Shortcuts
gradio.MultimodalTextbox
Interface String Shortcut `"multimodaltextbox"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
chatbot_multimodal
| Demos | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox 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 MultimodalTextbox component supports th... | Event Listeners | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
d of the media playing
in the MultimodalTextbox.
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 parameter of the function corresponds to one... | Event Listeners | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
ss: 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, "hidden"
shows no progress animation at... | Event Listeners | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
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. Functions that have
not yet run (or generat... | Event Listeners | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
'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 docs but callable by clients and via gr.loa... | Event Listeners | https://gradio.app/docs/gradio/multimodaltextbox | Gradio - Multimodaltextbox Docs |
Sidebar is a collapsible panel that renders child components on the left
side of the screen within a Blocks layout.
| Description | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
with gr.Blocks() as demo:
with gr.Sidebar():
gr.Textbox()
gr.Button()
| Example Usage | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
Parameters ▼
label: str | I18nData | None
default `= None`
name of the sidebar. Not displayed to the user.
open: bool
default `= True`
if True, sidebar is open by default.
visible: bool | Literal['hidden']
default `= True`
elem_id: str | None
default... | Initialization | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
Methods | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs | |
%20Copyright%202022%20Fonticons,%20Inc.... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar 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%20... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
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 gradio.co... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
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 on t... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
ators 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 pend... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
oad). 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 in @g... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar 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%... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
nds 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 gradio... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
on 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 o... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
nerators 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 p... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
r.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 in... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar 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%20... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
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 gradio.co... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
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 on t... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
ators 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 pend... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
oad). 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 in @g... | expand | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar 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%... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
nds 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 gradio... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
on 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 o... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
nerators 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 p... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
r.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 in... | collapse | https://gradio.app/docs/gradio/sidebar | Gradio - Sidebar Docs |
Creates a scatter plot component to display data from a pandas DataFrame.
| Description | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
**Using ScatterPlot as an input component.**
How ScatterPlot will pass its value to your function:
Type: `PlotData | None`
The data to display in a line plot.
Example Code
import gradio as gr
def predict(
value: PlotData | None
):
process valu... | Behavior | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
Parameters ▼
value: pd.DataFrame | Callable | None
default `= None`
The pandas dataframe containing the data to display in the plot.
x: str | None
default `= None`
Column corresponding to the x axis. Column can be numeric, datetime, or
string/category.
y: str | None
... | Initialization | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
ne`
List containing column names of the series to show in the legend. By default,
all series are shown.
x_lim: list[float | None] | None
default `= None`
A tuple or list containing the limits for the x-axis, specified as [x_min,
x_max]. To fix only one of these values, set the other to None, e.g. [0,... | Initialization | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
", "-x", "-y", or list of strings that represent the order of the
categories.
tooltip: Literal['axis', 'none', 'all'] | list[str]
default `= "axis"`
The tooltip to display when hovering on a point. "axis" shows the values for
the axis columns, "all" shows all column values, and "none" shows no tooltip... | Initialization | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
uts: 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.
visible: bool | Literal['hidden']
default `= True`
Whether the plo... | Initialization | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
-render.
preserved_by_key: list[str] | str | None
default `= "value"`
A list of parameters from this component's constructor. Inside a gr.render()
function, if a component is re-rendered with the same key, these (and only
these) parameters will be preserved in the UI (if they have been changed by
the ... | Initialization | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
`gr.LinePlot`, `gr.ScatterPlot`, and `gr.BarPlot` all share the same API. Here
is a summary of the most important features. For full details and live demos,
see the [Creating Plots](/guides/creating-plots) and [Time
Plots](/guides/time-plots) guides.
**Basic Usage with a DataFrame**
Pass a `pd.DataFrame` as the value... | Key Concepts | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
gr.ScatterPlot(df, x="weight", y="height")
@plot.select
def zoom(selection: gr.SelectData):
return gr.ScatterPlot(x_lim=[selection.index[0], selection.index[1]])
plot.double_click(lambda: gr.ScatterPlot(x_lim=None), outputs=plot)
**Realtime Data**
Use `gr.Timer` to keep ... | Key Concepts | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
Shortcuts
gradio.ScatterPlot
Interface String Shortcut `"scatterplot"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot Docs |
scatter_plot_demo
| Demos | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot 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 ScatterPlot component supports the foll... | Event Listeners | https://gradio.app/docs/gradio/scatterplot | Gradio - Scatterplot 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/scatterplot | Gradio - Scatterplot 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/scatterplot | Gradio - Scatterplot Docs |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.