replicate / app.py
multimodalart's picture
Create app.py
f3f0a16
raw
history blame
485 Bytes
import gradio as gr
import time
def update(name):
time.sleep(25)
return f"Welcome to Gradio, {name}!"
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.launch()