# Dynamic label of tabs

**URL:** </static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdynamic-label-of-tabs%2F62876%3E%5C
**Category:** 🔒 Gradio\
**Created:** [November 20, 2023, 3:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdynamic-label-of-tabs%2F62876 "2023-11-20T15:50:43Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dnns92](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dnns92](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdnns92)%5C
**Post date:** [November 20, 2023, 3:50pm UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdynamic-label-of-tabs%2F62876%2F1 "2023-11-20T15:50:43Z")

</div>

Hi Community,

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”

```auto
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()

```

---

<div class="post-metadata">

**Author:** ![dnns92](https://avatars.discourse-cdn.com/v4/letter/d/f0a364/32.png) [@dnns92](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Fu%2Fdnns92)%5C
**Post date:** [November 22, 2023, 9:03am UTC](/static-proxy?url=https%3A%2F%2Fdiscuss.huggingface.co%2Ft%2Fdynamic-label-of-tabs%2F62876%2F2 "2023-11-22T09:03:36Z")

</div>

bumping this
