I want my tabs name to change based on a file loaded at runtime.
Therefore, I tried to
- set a callback on the textfield to update the tab.label
- set a callback on the tab’s select() method.
None of these do work. Is there a possibility to implement something like this? See this minimal working example. The tab’s label should change from “initial tab name” to “updated tab name”
import gradio as gr import os os.environ["no_proxy"] = "localhost,127.0.0.1,::1" def print_me(): print("print me called.") some_tab.label="updated tab name" with gr.Blocks() as demo: with gr.Tab(label="initial tab name") as some_tab: textfield = gr.Text("put some text here", interactive=True) # initial try textfield.change(print_me, None, None) # some other tries some_tab.select(print_me, None, None) demo.launch()