Introducing Gradio 5.0
Read MoreIntroducing Gradio 5.0
Read MoreNew to Gradio? Start here: Getting Started
See the Release History
To install Gradio from main, run the following command:
pip install https://gradio-builds.s3.amazonaws.com/7e69a18da0fe5ccabdd516bf958213cf46862a63/gradio-5.15.0-py3-none-any.whl
*Note: Setting share=True
in
launch()
will not work.
gradio.TabbedInterface(interface_list, ยทยทยท)
css
, js
, and head
attributes) will not be loaded. tab_names: list[str] | None
= None
A list of tab names. If None, the tab names will be "Tab 1", "Tab 2", etc.
title: str | None
= None
The tab title to display when this demo is opened in a browser window.
theme: Theme | str | None
= 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. "soft" or "default"), or will attempt to load a theme from the Hugging Face Hub (e.g. "gradio/monochrome"). If None, will use the Default theme.
analytics_enabled: bool | None
= None
Whether to allow basic telemetry. If None, will use GRADIO_ANALYTICS_ENABLED environment variable or default to True.
css: str | None
= None
Custom css as a string or path to a css file. This css will be included in the demo webpage.
import gradio as gr
hello_world = gr.Interface(lambda name: "Hello " + name, "text", "text")
bye_world = gr.Interface(lambda name: "Bye " + name, "text", "text")
chat = gr.ChatInterface(lambda *args: "Hello " + args[0])
demo = gr.TabbedInterface([hello_world, bye_world, chat], ["Hello World", "Bye World", "Chat"])
if __name__ == "__main__":
demo.launch()