Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| def debug_click(drop_down): | |
| print(drop_down) | |
| return "yes" | |
| with gr.Blocks() as demo: | |
| drop_down = gr.Dropdown( | |
| choices=["first", "second"], type="index", interactive=True, multiselect=False | |
| ) | |
| txt = gr.Textbox() | |
| btn = gr.Button("Clear") | |
| btn.click(debug_click, inputs=drop_down, outputs=txt) | |