gradio/demo/progress_component/run.ipynb
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

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()