mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +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>
16 lines
342 B
Python
16 lines
342 B
Python
import gradio as gr
|
|
import time
|
|
|
|
def load_set(progress=gr.Progress()):
|
|
imgs = [None] * 24
|
|
for img in progress.tqdm(imgs, desc="Loading..."):
|
|
time.sleep(0.1)
|
|
return "Loaded"
|
|
|
|
|
|
with gr.Blocks() as demo:
|
|
load = gr.Button("Load")
|
|
label = gr.Label(label="Loader")
|
|
load.click(load_set, outputs=label)
|
|
|
|
demo.launch() |