mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-03 01:50:59 +08:00
79c8156ebb
* 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>
17 lines
245 B
Python
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()
|