mirror of
https://github.com/gradio-app/gradio.git
synced 2025-03-07 11:46:51 +08:00
* Sort requirements.in * Switch flake8 + isort to ruff * Apply ruff import order fixes * Fix ruff complaints in demo/ * Fix ruff complaints in test/ * Use `x is not y`, not `not x is y` * Remove unused listdir from website generator * Clean up duplicate dict keys * Add changelog entry * Clean up unused imports (except in gradio/__init__.py) * add space --------- Co-authored-by: Abubakar Abid <abubakar@huggingface.co>
18 lines
469 B
Python
18 lines
469 B
Python
import gradio as gr
|
|
import time
|
|
|
|
css = "footer {display: none !important;} .gradio-container {min-height: 0px !important;}"
|
|
|
|
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(css=css) as demo:
|
|
load = gr.Button("Load")
|
|
label = gr.Label(label="Loader")
|
|
load.click(load_set, outputs=label)
|
|
|
|
demo.queue(concurrency_count=20).launch() |