File size: 352 Bytes
869c384 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
import gradio as gr
with gr.Blocks() as demo:
with gr.Blocks() as block1:
gr.Button("1")
with gr.Blocks() as block2:
gr.Button("2")
# gr.Button("Toggle Block 1").click(toggle_block1, None)
# 在这里,您可以将不同的组件添加到块1和块2中
# 然后通过点击按钮来切换块1的可见性
demo.launch()
|