tilents
user complete1
869c384
raw
history blame contribute delete
332 Bytes
import gradio as gr
def show_button(flag):
button = gr.Button("Click Me")
# button.visible = flag # 控制按钮的可见性
return "ddd"
demo = gr.Interface(
show_button,
"checkbox", # 添加一个复选框组件,用于控制按钮的可见性
"button"
)
if __name__ == "__main__":
demo.launch()