Spaces:
Runtime error
Runtime error
File size: 491 Bytes
9aceb6e adbfdfa 9aceb6e | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/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()
|