File size: 269 Bytes
d6439c9
 
 
 
 
 
 
1
2
3
4
5
6
7
from gradio import Progress

def create_progress_updater(start: int, total: int, desc: str, progress: Progress):
    def updater(pipe, step, timestep, callback_kwargs):
        progress((step + start, total), desc=desc)
        return callback_kwargs
    return updater