mirror of
https://github.com/gradio-app/gradio.git
synced 2024-12-15 02:11:15 +08:00
02c7bfe1ed
* add embedded component for dataset * add embedded component for examples * add embedded component for progress * remove make_waveform * add embedded component for uploadbutton * remove footer on lineplot embedded component * remove broken image from gallery * add embedded component for interpretation * generated notebooks * changelog * change example component demo to images * remove natgeo img in gallery demo * regenerate notebooks
19 lines
481 B
Python
19 lines
481 B
Python
import gradio as gr
|
|
import time
|
|
import tqdm
|
|
|
|
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() |