Constructor
Parameters
bool
default:"False"
If True, the Progress object will track any tqdm.tqdm iterations with the tqdm library in the function.
Methods
call
float | tuple[int, int | None] | None
If float, should be between 0 and 1 representing completion. If tuple, first number represents steps completed, and second value represents total steps or None if unknown. If None, hides progress bar.
str | None
default:"None"
Description to display.
int | float | None
default:"None"
Estimated total number of steps.
str
default:"'steps'"
Unit of iterations.
tqdm
Iterable | None
Iterable to attach progress tracker to.
str | None
default:"None"
Description to display.
int | float | None
default:"None"
Estimated total number of steps.
str
default:"'steps'"
Unit of iterations.
update
int | float
default:"1"
Number of steps completed.
Examples
Basic Progress
Progress with Steps
Progress with tqdm
Notes
- To attach a Progress tracker to a function, add a parameter right after the input parameters that has a default value set to a
gr.Progress()instance - The Progress tracker automatically appears in the Gradio UI when the function is running
- You can use either the functional style (calling
progress()) or the tqdm-like style (usingprogress.tqdm()) - Progress updates are displayed in real-time to users