mirror of
https://github.com/gradio-app/gradio.git
synced 2025-02-11 11:19:58 +08:00
* 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>
944 B
944 B
Gradio Demo: progress_component¶
In [ ]:
!pip install -q gradio tqdm
In [ ]:
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()