EllieKini/Herta
Audio-to-Audio โข Updated
text stringlengths 0 2k | heading1 stringlengths 3 79 | source_page_url stringclasses 189
values | source_page_title stringclasses 189
values |
|---|---|---|---|
Creates a component to displays a base image and colored annotations on top
of that image. Annotations can take the from of rectangles (e.g. object
detection) or masks (e.g. image segmentation). As this component does not
accept user input, it is rarely used as an input component.
| Description | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
**Using AnnotatedImage as an input component.**
How AnnotatedImage will pass its value to your function:
Type: `tuple[str, list[tuple[str, str]]] | None`
Passes its value as a `tuple` consisting of:
* `str` filepath to a base image
* `list` of annotations.
* Each annotation itself is a `tuple` of a mask (... | Behavior | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
Parameters โผ
value: tuple[np.ndarray | PIL.Image.Image | str, list[tuple[np.ndarray | tuple[int, int, int, int], str]]] | None
default `= None`
Tuple of base image and list of (annotation, label) pairs.
format: str
default `= "webp"`
Format used to save images before it is returned t... | Initialization | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
ect otherwise). Can provide a Timer 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... | Initialization | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
e rendered in the Blocks context. Should
be used if the 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 ... | Initialization | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
Shortcuts
gradio.AnnotatedImage
Interface String Shortcut `"annotatedimage"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
image_segmentation
| Demos | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage 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 AnnotatedImage component supports the f... | Event Listeners | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
his 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 | None
d... | Event Listeners | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
ut 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 should be... | Event Listeners | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
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 of 'in... | Event Listeners | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
al 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. The vali... | Event Listeners | https://gradio.app/docs/gradio/annotatedimage | Gradio - Annotatedimage Docs |
Creates an image component that can be used to upload images (as an input)
or display images (as an output).
| Description | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
**Using SimpleImage as an input component.**
How SimpleImage will pass its value to your function:
Type: `str | None`
A `str` containing the path to the image.
Example Code
import gradio as gr
def predict(
value: str | None
):
process value fr... | Behavior | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
Parameters โผ
value: str | None
default `= None`
A path or URL for the default value that SimpleImage component is going to
take. 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
defa... | Initialization | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
ill_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 first.
interactive: bool | No... | Initialization | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
t 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) instead of re-rendered based on the values
provided during constructor.
| Initialization | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
Shortcuts
gradio.SimpleImage
Interface String Shortcut `"simpleimage"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage 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 SimpleImage component supports the foll... | Event Listeners | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
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 | None
default `= None`
defines how the endpoint appears in the API docs. Can be a string or ... | Event Listeners | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
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 should be
of equal length (and be up to length `max_batch_size`). The function is then
*require... | Event Listeners | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
d 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 of 'inputs' and 'outputs', return should be a list of values
for output components.
... | Event Listeners | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
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. The validator
receives the same inputs as the main function and should return a
`gr.validate()... | Event Listeners | https://gradio.app/docs/gradio/simpleimage | Gradio - Simpleimage Docs |
The gr.EditData class is a subclass of gr.Event data that specifically
carries information about the `.edit()` event. When gr.EditData is added as a
type hint to an argument of an event listener method, a gr.EditData object
will automatically be passed as the value of that argument. The attributes of
this object contai... | Description | https://gradio.app/docs/gradio/editdata | Gradio - Editdata Docs |
import gradio as gr
def edit(edit_data: gr.EditData, history: list[gr.MessageDict]):
history_up_to_edit = history[:edit_data.index]
history_up_to_edit[-1] = edit_data.value
return history_up_to_edit
with gr.Blocks() as demo:
chatbot = gr.Chatbot()
chatbot.undo(e... | Example Usage | https://gradio.app/docs/gradio/editdata | Gradio - Editdata Docs |
Parameters โผ
index: int | tuple[int, int]
The index of the message that was edited.
previous_value: Any
The previous content of the message that was edited.
value: Any
The new content of the message that was edited.
[Chatbot Specific Events](../../guides/chatbot-speci... | Attributes | https://gradio.app/docs/gradio/editdata | Gradio - Editdata Docs |
Column is a layout element within Blocks that renders all children
vertically. The widths of columns can be set through the `scale` and
`min_width` parameters. If a certain scale results in a column narrower than
min_width, the min_width parameter will win.
| Description | https://gradio.app/docs/gradio/column | Gradio - Column Docs |
with gr.Blocks() as demo:
with gr.Row():
with gr.Column(scale=1):
text1 = gr.Textbox()
text2 = gr.Textbox()
with gr.Column(scale=4):
btn1 = gr.Button("Button 1")
btn2 = gr.Button("Button 2")
| Example Usage | https://gradio.app/docs/gradio/column | Gradio - Column Docs |
Parameters โผ
scale: int
default `= 1`
relative width compared to adjacent Columns. For example, if Column A has
scale=2, and Column B has scale=1, A will be twice as wide as B.
min_width: int
default `= 320`
minimum pixel width of Column, will wrap if not sufficient screen space to
s... | Initialization | https://gradio.app/docs/gradio/column | Gradio - Column Docs |
ved_by_key: list[str] | str | None
default `= None`
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) instead... | Initialization | https://gradio.app/docs/gradio/column | Gradio - Column Docs |
Mount a gradio.Blocks to an existing FastAPI application.
| Description | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
from fastapi import FastAPI
import gradio as gr
app = FastAPI()
@app.get("/")
def read_main():
return {"message": "This is your main app"}
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
app = gr.mount_gradio_app(app, io, path="/gradio")
Then run `uvicorn run:app`... | Example Usage | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
Parameters โผ
app: fastapi.FastAPI
The parent FastAPI application.
blocks: gradio.Blocks
The blocks object we want to mount to the parent app.
path: str
The path at which the gradio application will be mounted, e.g. "/gradio".
server_name: str
default `... | Initialization | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
pp as a
dictionary of parameter keys and argument values. For example, `{"docs_url":
"/docs"}`
auth: Callable | tuple[str, str] | list[tuple[str, str]] | None
default `= None`
If provided, username and password (or list of username-password tuples)
required to access the gradio app. Can also provide f... | Initialization | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
these directories or their subdirectories are accessible to all
users of your app.
blocked_paths: list[str] | None
default `= None`
List of complete filepaths or parent directories that this gradio app is not
allowed to serve (i.e. users of your app are not allowed to access). Must be
absolute paths. ... | Initialization | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
on which the Node server should run. If None, will use
GRADIO_NODE_SERVER_PORT environment variable or find a free port.
enable_monitoring: bool | None
default `= None`
pwa: bool | None
default `= None`
i18n: I18n | None
default `= None`
If provided, the i18n instance... | Initialization | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
page.
head_paths: str | Path | list[str | Path] | None
default `= None`
Custom html code as a pathlib.Path to a html file or a list of such paths.
This html files will be read, concatenated, and included in the head of the
demo webpage. If the `head` parameter is also set, the html from `head` will
be... | Initialization | https://gradio.app/docs/gradio/mount_gradio_app | Gradio - Mount_Gradio_App Docs |
The gr.CopyData class is a subclass of gr.EventData that specifically
carries information about the `.copy()` event. When gr.CopyData is added as a
type hint to an argument of an event listener method, a gr.CopyData object
will automatically be passed as the value of that argument. The attributes of
this object contain... | Description | https://gradio.app/docs/gradio/copydata | Gradio - Copydata Docs |
import gradio as gr
def on_copy(copy_data: gr.CopyData):
return f"Copied text: {copy_data.value}"
with gr.Blocks() as demo:
textbox = gr.Textbox("Hello World!")
copied = gr.Textbox()
textbox.copy(on_copy, None, copied)
demo.launch()
| Example Usage | https://gradio.app/docs/gradio/copydata | Gradio - Copydata Docs |
Parameters โผ
value: Any
The value that was copied.
| Attributes | https://gradio.app/docs/gradio/copydata | Gradio - Copydata Docs |
Creates a set of checkboxes. Can be used as an input to pass a set of
values to a function or as an output to display values, a subset of which are
selected.
| Description | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
**Using CheckboxGroup as an input component.**
How CheckboxGroup will pass its value to your function:
Type: `list[str | int | float] | list[int | None]`
Passes the list of checked checkboxes as a `list[str | int | float]` or their indices as a `list[int]` into the function, depending on `type`.
Example Code
... | Behavior | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
Parameters โผ
choices: list[str | int | float | tuple[str | I18nData, str | int | float]] | None
default `= None`
A list of string or numeric options to select from. An option can also be a
tuple of the form (name, value), where name is the displayed name of the
checkbox button and value is the value t... | Initialization | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
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 display label.
show_select_al... | Initialization | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
default `= None`
An optional list of strings that are assigned as the classes of this component
in the HTML DOM. Can be used for targeting CSS styles.
render: bool
default `= True`
If False, component will not render be rendered in the Blocks context. Should
be used if the intention is to assign ev... | Initialization | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
Shortcuts
gradio.CheckboxGroup
Interface String Shortcut `"checkboxgroup"`
Initialization Uses default values
| Shortcuts | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
sentence_builder
| Demos | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup 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 CheckboxGroup component supports the fo... | Event Listeners | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
BlockContext] | None
default `= None`
List 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 us... | Event Listeners | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
ol
default `= True`
If True, will place the 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 ... | Event Listeners | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
)`) would not allow any
submissions while an 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
de... | Event Listeners | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
ne`
A unique key for this event listener to 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 wi... | Event Listeners | https://gradio.app/docs/gradio/checkboxgroup | Gradio - Checkboxgroup Docs |
Blocks is Gradio's low-level API that allows you to create more custom web
applications and demos than Interfaces (yet still entirely in Python).
Compared to the Interface class, Blocks offers more flexibility and control
over: (1) the layout of components (2) the events that trigger the execution
of functions (3)... | Description | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
import gradio as gr
def update(name):
return f"Welcome to Gradio, {name}!"
with gr.Blocks() as demo:
gr.Markdown("Start typing below and then click **Run** to see the output.")
with gr.Row():
inp = gr.Textbox(placeholder="What is your name?")
out = gr.Textbox... | Example Usage | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
Parameters โผ
analytics_enabled: bool | None
default `= None`
Whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED
environment variable or default to True.
mode: str
default `= "blocks"`
A human-friendly name for the kind of Blocks or Interface being created. U... | Initialization | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
blocks_helloblocks_flipperblocks_kinematics
| Demos | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
Methods | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs | |
%20Copyright%202022%20Fonticons,%20Inc.... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%203... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%2039... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
inline: bool | None
default `= None`
whether to display in the gradio app 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: bo... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
default `= False`
If True, any errors in the gradio app will be displayed in 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 net... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
t `= False`
If True, suppresses most print statements.
footer_links: 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... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
filepaths or parent directories that gradio is not allowed to
serve (i.e. users 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.
... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
ocol: Literal['http', 'https'] | None
default `= None`
Use this to specify the 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 "ht... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
prevents external domains from making requests to a Gradio 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... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
h are used to translate
strings in our components (e.g. 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 str... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%2031... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
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%203... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
will send status estimations to all clients whenever a job is
finished. Otherwise Queue will 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... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | integrate | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%... | integrate | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
| 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/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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.... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
ction 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[Component |... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
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.
queue: bo... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
s .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 `.change(... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
(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 `= No... | load | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | unload | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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.4... | unload | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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... | unload | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
ources. The function should not take any
arguments and the output is not used.
[Blocks And Event Listeners](../../guides/blocks-and-event-
listeners/)[Controlling Layout](../../guides/controlling-layout/)[State In
Blocks](../../guides/state-in-blocks/)[More Blocks
Features](../../guides/more-blocks-features/)
| unload | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%203... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%2039... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
inline: bool | None
default `= None`
whether to display in the gradio app 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: bo... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
default `= False`
If True, any errors in the gradio app will be displayed in 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 net... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
t `= False`
If True, suppresses most print statements.
footer_links: 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... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
filepaths or parent directories that gradio is not allowed to
serve (i.e. users 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.
... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
ocol: Literal['http', 'https'] | None
default `= None`
Use this to specify the 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 "ht... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
prevents external domains from making requests to a Gradio 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... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
h are used to translate
strings in our components (e.g. 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 str... | launch | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%2031... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
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%203... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
will send status estimations to all clients whenever a job is
finished. Otherwise Queue will 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... | queue | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
%20Copyright%202022%20Fonticons,%20Inc.... | integrate | https://gradio.app/docs/gradio/blocks | Gradio - Blocks 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%... | integrate | https://gradio.app/docs/gradio/blocks | Gradio - Blocks Docs |
No dataset card yet