CoolFace
Apppublic

hysts-debug/dropdown-incorrect-value

sourceHugging Facemitupdated 3y agoView on Hugging Face
0likes
app.py21 linesDownload Raw Back to root
1#!/usr/bin/env python2 3import gradio as gr4 5with gr.Blocks() as demo:6    with gr.Row():7        with gr.Column():8            dropdown = gr.Dropdown(9                choices=["abc", "def", "ghi"],10                value="abc",11                allow_custom_value=False,12            )13            button = gr.Button()14        with gr.Column():15            out = gr.Textbox()16 17    button.click(fn=lambda x: x, inputs=dropdown, outputs=out)18 19if __name__ == "__main__":20    demo.queue().launch()21