Spaces:
Runtime error
Runtime error
| #!/usr/bin/env python | |
| import gradio as gr | |
| with gr.Blocks() as demo: | |
| with gr.Row(): | |
| with gr.Column(): | |
| dropdown = gr.Dropdown( | |
| choices=["abc", "def", "ghi"], | |
| value="abc", | |
| allow_custom_value=False, | |
| ) | |
| button = gr.Button() | |
| with gr.Column(): | |
| out = gr.Textbox() | |
| button.click(fn=lambda x: x, inputs=dropdown, outputs=out) | |
| if __name__ == "__main__": | |
| demo.queue().launch() | |