You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a gradio app with two functions for seperate purposes. When running the Interfaces in isolation, they work as expected. When I put them in the TabbedInterface, which ever tab is put first works fine, but the second one always begins running the logic of the first. Again, this happens no matter which of the interfaces I put first, the second tab always runs the others logic.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
# slightly edited from original source codeimportgradioasgrdefa(audio):
# not sharing source codeprint('foo')
defb(audio):
print('bar')
a_demo=gr.Interface(
a,
"audio",
"audio",
)
b_demo=gr.Interface(
b,
"audio",
[gr.Number(label="Watermark Score (0-1)"), gr.Textbox(label="Watermark Message")],
)
demo=gr.TabbedInterface(
[a_demo, b_demo],
["A Demo", "B Demo"],
)
defget_args():
parser=argparse.ArgumentParser(description="Run the watermarking application")
parser.add_argument(
"--a", action="store_true", help="Launch only the watermark demo"
)
parser.add_argument(
"--b", action="store_true", help="Launch only the check watermark demo"
)
parser.add_argument(
"--port",
type=int,
default=7860,
help="Specify the port number for the server to run on",
)
returnparser.parse_args()
defmain():
args=get_args()
ifargs.a:
a_demo.launch(
show_error=True, debug=True, server_port=args.port, share=True
)
elifargs.b:
b_demo.launch(
show_error=True, debug=True, server_port=args.port, share=True
)
else:
demo.launch(show_error=True, server_port=args.port)
Screenshot
No response
Logs
No response
System Info
Gradio Environment Information:
------------------------------
Operating System: Darwin
gradio version: 4.33.0
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: 24.0
pandas: 2.2.2
pillow: 10.3.0
pydantic: 2.7.3
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.12.1
urllib3: 2.2.1
uvicorn: 0.30.1
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2024.6.0
httpx: 0.27.0
huggingface-hub: 0.23.2
packaging: 24.0
typing-extensions: 4.12.1
websockets: 11.0.3
### Severity
I can work around it
The text was updated successfully, but these errors were encountered:
Describe the bug
I have a gradio app with two functions for seperate purposes. When running the Interfaces in isolation, they work as expected. When I put them in the TabbedInterface, which ever tab is put first works fine, but the second one always begins running the logic of the first. Again, this happens no matter which of the interfaces I put first, the second tab always runs the others logic.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
No response
System Info
The text was updated successfully, but these errors were encountered: