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