Closed luaperl closed 3 weeks ago
The demo example (tabbed_interface_lite) in the official TabbedInterface documentation does not work properly.
The first tab (Hello World) prints "Hello name" as the code says, but the second tab (Bye World) does not print anything.
I tried running the code directly in a local environment, but the phenomenon was the same. If it was my mistake, please let me know what I did wrong.
import gradio as gr hello_world = gr.Interface(lambda name: "Hello " + name, "text", "text") bye_world = gr.Interface(lambda name: "Bye " + name, "text", "text") demo = gr.TabbedInterface([hello_world, bye_world], ["Hello World", "Bye World"]) if __name__ == "__main__": demo.launch()
No response
Gradio Environment Information: ------------------------------ Operating System: Linux gradio version: 4.32.2 gradio_client version: 0.17.0 ------------------------------------------------ gradio dependencies in your environment: aiofiles: 23.2.1 altair: 5.3.0 fastapi: 0.111.0 ffmpy: 0.3.2 gradio-client==0.17.0 is not installed. httpx: 0.27.0 huggingface-hub: 0.23.2 importlib-resources: 6.4.0 jinja2: 3.1.4 markupsafe: 2.1.5 matplotlib: 3.9.0 numpy: 1.26.4 orjson: 3.10.3 packaging: 23.1 pandas: 2.2.2 pillow: 10.3.0 pydantic: 2.7.1 pydub: 0.25.1 python-multipart: 0.0.9 pyyaml: 6.0.1 ruff: 0.4.7 semantic-version: 2.10.0 tomlkit==0.12.0 is not installed. typer: 0.12.3 typing-extensions: 4.11.0 urllib3: 2.1.0 uvicorn: 0.30.1 authlib; extra == 'oauth' is not installed. itsdangerous; extra == 'oauth' is not installed. gradio_client dependencies in your environment: fsspec: 2024.5.0 httpx: 0.27.0 huggingface-hub: 0.23.2 packaging: 23.1 typing-extensions: 4.11.0 websockets: 11.0.3
I can work around it
Thanks @luaperl I can indeed repro the issue, but it looks like a duplicate of https://github.com/gradio-app/gradio/issues/8425, so let me go ahead and close this one
Describe the bug
The demo example (tabbed_interface_lite) in the official TabbedInterface documentation does not work properly.
The first tab (Hello World) prints "Hello name" as the code says, but the second tab (Bye World) does not print anything.
I tried running the code directly in a local environment, but the phenomenon was the same. If it was my mistake, please let me know what I did wrong.
Have you searched existing issues? 🔎
Reproduction
Screenshot
Logs
No response
System Info
Severity
I can work around it