File size: 296 Bytes
cdd672b
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr

with gr.Blocks() as demo:
    t1 = gr.Label("Hello world!")
    btn = gr.Button("Click me")
    t2 = gr.Label("Hello world!", visible=False)
    def update():
        return "abc", gr.update(visible=True)
    btn.click(update, inputs=[], outputs=[t2, t2])

# %%
demo.launch()