import gradio as gr import time def update(name): time.sleep(25) return f"Welcome to Gradio!" def test(): return("test") with gr.Blocks() as demo: gr.Markdown("Start typing below and then click **Run** to see the output.") with gr.Row(): inp = gr.Image() out = gr.Textbox() out_test = gr.Textbox() btn = gr.Button("Run") inp.upload(fn=test, outputs=out_test) btn.click(fn=update, inputs=inp, outputs=out) demo.queue(default_concurrency_limit=1) demo.launch()