tmp-progress / app.py
albertvillanova's picture
Update app.py
c7bf71a verified
raw
history blame
373 Bytes
import gradio as gr
import time
def my_function(x, progress=gr.Progress()):
progress(0, desc="Starting...")
time.sleep(1)
for i in progress.tqdm(range(100)):
time.sleep(0.1)
return progress, x
# gr.Interface(my_function, gr.Textbox(), gr.Textbox()).queue().launch()
gr.Interface(my_function, gr.Textbox(), [gr.Textbox(), gr.HTML()]).queue().launch()