组件联动:
import gradio as gr
def change_value(dropdown_value):
return dropdown_value
with gr.Blocks() as demo:
inp = gr.Dropdown(["cat","dog","bird"],label='Animal')
out = gr.Textbox(label='changetest')
inp.change(change_value,[inp],[out])
demo.launch()