gradio/demo/concurrency_with_queue/run.py
aliabid94 79c8156ebb
Queue concurrency count (#6172)
* changes

* add changeset

* changes

* changes

* changes

* Update client/python/test/conftest.py

Co-authored-by: Abubakar Abid <abubakar@huggingface.co>

* changes

* changes

* changes

---------

Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>
Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
2023-10-31 02:41:19 -07:00

17 lines
245 B
Python

import gradio as gr
import time
def say_hello(name):
time.sleep(5)
return f"Hello {name}!"
with gr.Blocks() as demo:
inp = gr.Textbox()
outp = gr.Textbox()
button = gr.Button()
button.click(say_hello, inp, outp)
demo.launch()