text
stringlengths
0
2k
heading1
stringlengths
3
79
source_page_url
stringclasses
186 values
source_page_title
stringclasses
186 values
Parameters ▼ simplify_file_data: bool default `= True` If True, the file data will be simplified before being written to the CSV file. If CSVLogger is being used to cache examples, this is set to False to preserve the original FileData class verbose: bool default `= True` If True, pr...
Initialization
https://gradio.app/docs/gradio/flagging
Gradio - Flagging Docs
Component to select a date and (optionally) a time.
Description
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
**Using DateTime as an input component.** How DateTime will pass its value to your function: Type: `str | float | datetime | None` Passes text value as a `str` into the function. Example Code import gradio as gr def predict( value: str | float | datetime | None ...
Behavior
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
Parameters ▼ value: float | str | datetime | None default `= None` default value for datetime. include_time: bool default `= True` If True, the component will include time selection. If False, only date selection will be available. type: Literal['timestamp', 'datetime...
Initialization
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
nents. For example if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True. min_width: int default `= 160` minimum pixel width, will wrap if not suf...
Initialization
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
y have been changed by the user or an event listener) instead of re-rendered based on the values 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 t...
Initialization
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
Shortcuts gradio.DateTime Interface String Shortcut `"datetime"` Initialization Uses default values
Shortcuts
https://gradio.app/docs/gradio/datetime
Gradio - Datetime 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 DateTime component supports the followi...
Event Listeners
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
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 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 u...
Event Listeners
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
ning 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 *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. ...
Event Listeners
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
end 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. concurrency_limit: int | None | Literal['default'] default `= "default"` If set, this is the maximum number of this event that can be r...
Event Listeners
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
e=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()` for each input value. [Time Plots](../../guides/time-plots/)
Event Listeners
https://gradio.app/docs/gradio/datetime
Gradio - Datetime Docs
A TabbedInterface is created by providing a list of Interfaces or Blocks, each of which gets rendered in a separate tab. Only the components from the Interface/Blocks will be rendered in the tab.
Description
https://gradio.app/docs/gradio/tabbedinterface
Gradio - Tabbedinterface Docs
Parameters ▼ interface_list: list[Blocks] A list of Interfaces (or Blocks) to be rendered in the tabs. tab_names: list[str] | None default `= None` A list of tab names. If None, the tab names will be "Tab 1", "Tab 2", etc. title: str | None default `= None` The tab t...
Initialization
https://gradio.app/docs/gradio/tabbedinterface
Gradio - Tabbedinterface Docs
tabbed_interface_lite
Demos
https://gradio.app/docs/gradio/tabbedinterface
Gradio - Tabbedinterface Docs
Creates a slider that ranges from `minimum` to `maximum` with a step size of `step`.
Description
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
**Using Slider as an input component.** How Slider will pass its value to your function: Type: `float` Passes slider value as a `float` into the function. Example Code import gradio as gr def predict( value: float ): process value from the Sli...
Behavior
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
Parameters ▼ minimum: float default `= 0` minimum value for slider. When used as an input, if a user provides a smaller value, a gr.Error exception is raised by the backend. maximum: float default `= 100` maximum value for slider. When used as an input, if a user provides a larger va...
Initialization
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
sed 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. container: bool default `= True` If True, will place the component in a con...
Initialization
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
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 event listeners now but render the component later. key: int | str | tuple[int | str, ...] | None default `= None` in a gr.render, Components with t...
Initialization
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
Shortcuts gradio.Slider Interface String Shortcut `"slider"` Initialization Uses default values
Shortcuts
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
Logarithmic scale Sliders are linear by default. For parameters that vary over several orders of magnitude (e.g. learning rate), map the slider value inside your function: import gradio as gr def train(lr_exp): lr = 10 ** lr_exp slider value -5 → lr 0.00001 return f"Training wi...
Common Patterns
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
sentence_builderslider_releaseinterface_random_sliderblocks_random_slider
Demos
https://gradio.app/docs/gradio/slider
Gradio - Slider 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 Slider component supports the following...
Event Listeners
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
| 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 None. If set to a string, the endpoint will be exposed in ...
Event Listeners
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
ol 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 *required* to return a tuple of lists (even if there is only 1 out...
Event Listeners
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
plete. 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. concurrency_limit: int | None | Literal['default']...
Event Listeners
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
n 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()` for each input value.
Event Listeners
https://gradio.app/docs/gradio/slider
Gradio - Slider Docs
Displays a classification label, along with confidence scores of top categories, if provided. As this component does not accept user input, it is rarely used as an input component.
Description
https://gradio.app/docs/gradio/label
Gradio - Label Docs
**Using Label as an input component.** How Label will pass its value to your function: Type: `dict[str, float] | str | int | float | None` Depending on the value, passes the label as a `str | int | float`, or the labels and confidences as a `dict[str, float]`. Example Code import gradio ...
Behavior
https://gradio.app/docs/gradio/label
Gradio - Label Docs
Parameters ▼ value: dict[str, float] | str | float | Callable | None default `= None` Default value to show in the component. If a str or number is provided, simply displays the string or number. If a {Dict[str, float]} of classes and confidences is provided, displays the top class on top and the `num...
Initialization
https://gradio.app/docs/gradio/label
Gradio - Label Docs
if Components A and B are in a Row, and A has scale=2, and B has scale=1, A will be twice as wide as B. Should be an integer. scale applies in Rows, and to top-level Components in Blocks where fill_height=True. min_width: int default `= 160` minimum pixel width, will wrap if not sufficient screen spac...
Initialization
https://gradio.app/docs/gradio/label
Gradio - Label Docs
meters 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. color: str | None default `= None` The background color of the label (either a valid css color name or hexadecimal string). ...
Initialization
https://gradio.app/docs/gradio/label
Gradio - Label Docs
Shortcuts gradio.Label Interface String Shortcut `"label"` Initialization Uses default values
Shortcuts
https://gradio.app/docs/gradio/label
Gradio - Label 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 Label component supports the following ...
Event Listeners
https://gradio.app/docs/gradio/label
Gradio - Label Docs
| 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 default `= None` defines how the endpoint appears in the API do...
Event Listeners
https://gradio.app/docs/gradio/label
Gradio - Label Docs
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 of equal length (and be up to length `max_batch_size`). The fu...
Event Listeners
https://gradio.app/docs/gradio/label
Gradio - Label Docs
.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 'inputs' and 'outputs', return should be a list of values for outp...
Event Listeners
https://gradio.app/docs/gradio/label
Gradio - Label Docs
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 validator receives the same inputs as the main function and should ...
Event Listeners
https://gradio.app/docs/gradio/label
Gradio - Label Docs
Interface is Gradio's main high-level class, and allows you to create a web-based GUI / demo around a machine learning model (or any Python function) in a few lines of code. You must specify three parameters: (1) the function to create a GUI for (2) the desired input components and (3) the desired output components. Ad...
Description
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
import gradio as gr def image_classifier(inp): return {'cat': 0.3, 'dog': 0.7} demo = gr.Interface(fn=image_classifier, inputs="image", outputs="label") demo.launch()
Example Usage
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
Parameters ▼ fn: Callable the function to wrap an interface around. 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 the tuple corresponding t...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
If True, caches examples in the server for fast runtime in examples. If "lazy", then examples are cached (for all users of the app) after their first use (by any user of the app). If None, will use the GRADIO_CACHE_EXAMPLES environment variable, which should be either "true" or "false". In HuggingFace Spaces, this pa...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
tically rerun if any of the inputs change. title: str | I18nData | None default `= None` a title for the interface; if provided, appears above the input and output components in large font. Also used as the tab title when opened in a browser window. description: str | None default `= ...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
s ["X", "Y"], in which case the values will be the list of strings and the labels will ["Flag as X", "Flag as Y"], etc. flagging_dir: str default `= ".gradio/flagged"` path to the directory where flagged data is stored. If the directory does not exist, it will be created. flagging_call...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
None` defines how the prediction endpoint 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, the name of the function will be used. api_description: str | None | Literal[False] default `= None` Description ...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
an be provided as well to configure other properties of the container holding the additional inputs. Defaults to a `gr.Accordion(label="Additional Inputs", open=False)`. This parameter is only used if `additional_inputs` is provided. submit_btn: str | Button default `= "Submit"` the button to use for ...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
'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 all ...
Initialization
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
hello_worldhello_world_2hello_world_3
Demos
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
Methods
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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'] | 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", or "settings" corresponding to the API docs, "built with Gradio", and settings pages respectively. If ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
be set by environment variable GRADIO_ROOT_PATH. Defaults to "". app_kwargs: dict[str, Any] | None default `= None` Additional keyword arguments to pass to the underlying FastAPI app as a dictionary of parameter keys and argument values. For example, `{"docs_url": "/docs"}` state_sessi...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
] | None default `= None` A function that takes a FastAPI request and returns a string user ID or None. If the function returns None for a specific request, that user is not authorized to access the app (they will see a 401 Unauthorized response). To be used with external authentication systems like OAuth. Cannot be ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
vironment variable or default to False. pwa: bool | None default `= None` If True, the Gradio app will be set up as an installable PWA (Progressive Web App). If set to None (default behavior), then the PWA feature will be enabled if this Gradio app is launched on Spaces, but not otherwise. ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
ly be executed when the page loads. For more flexibility, use the head parameter to insert js inside <script> tags. head: str | None default `= None` Custom html code to insert into the head of the demo webpage. This can be used to add custom meta tags, multiple scripts, stylesheets, etc. to the page....
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
wandb: ModuleType | 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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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'] | 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", or "settings" corresponding to the API docs, "built with Gradio", and settings pages respectively. If ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
be set by environment variable GRADIO_ROOT_PATH. Defaults to "". app_kwargs: dict[str, Any] | None default `= None` Additional keyword arguments to pass to the underlying FastAPI app as a dictionary of parameter keys and argument values. For example, `{"docs_url": "/docs"}` state_sessi...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
] | None default `= None` A function that takes a FastAPI request and returns a string user ID or None. If the function returns None for a specific request, that user is not authorized to access the app (they will see a 401 Unauthorized response). To be used with external authentication systems like OAuth. Cannot be ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
vironment variable or default to False. pwa: bool | None default `= None` If True, the Gradio app will be set up as an installable PWA (Progressive Web App). If set to None (default behavior), then the PWA feature will be enabled if this Gradio app is launched on Spaces, but not otherwise. ...
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
ly be executed when the page loads. For more flexibility, use the head parameter to insert js inside <script> tags. head: str | None default `= None` Custom html code to insert into the head of the demo webpage. This can be used to add custom meta tags, multiple scripts, stylesheets, etc. to the page....
launch
https://gradio.app/docs/gradio/interface
Gradio - Interface Docs
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
![](data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/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....
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
wandb: ModuleType | 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