Skip to main content
Gradio supports the ability to create custom progress bars so that you have customizability and control over the progress update that you show to the user.

Basic usage

To enable progress bars, add an argument to your function that has a default value of a gr.Progress instance. Then you can update the progress levels by calling this instance directly with a float between 0 and 1.
In this example, the progress bar will:
  1. Start at 0% with the description “Starting”
  2. Update to 5% after a brief pause
  3. Show incremental progress with the description “Reversing” as it processes each letter

Using the tqdm method

The Progress instance provides a tqdm() method that makes it easy to track progress over an iterable. This method works similarly to the popular tqdm library:

Automatic tqdm integration

If you use the tqdm library, you can even report progress updates automatically from any tqdm.tqdm that already exists within your function by setting the default argument as gr.Progress(track_tqdm=True):
With track_tqdm=True, you don’t need to manually update the progress - Gradio automatically tracks any tqdm progress bars in your function.

Progress bar parameters

When calling the Progress instance, you can provide:
  • Float value (0-1): The progress level as a decimal between 0 and 1
  • desc parameter: A description string to display with the progress bar

Multi-step progress tracking

For complex operations with multiple stages, you can combine direct progress updates with the tqdm() method:
Progress bars provide valuable feedback to users during long-running operations, improving the overall user experience of your Gradio app.