Spaces:
Sleeping
Sleeping
| import time | |
| import gradio as gr | |
| def fn(): | |
| time.sleep(5) | |
| return 'test' | |
| with gr.Blocks() as demo: | |
| button = gr.Button('run') | |
| gr.Slider(minimum=0, maximum=1000, value=1, step=1, randomize=True) | |
| text = gr.Text() | |
| button.click(fn=fn, outputs=text) | |
| demo.queue().launch() | |