fffiloni commited on
Commit
f351c05
·
verified ·
1 Parent(s): b4c984f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -105,7 +105,10 @@ def generate_image(setup_args, num_iterations):
105
 
106
  # Define progress_callback that updates steps_completed
107
  def progress_callback(step):
108
- steps_completed.append(step)
 
 
 
109
 
110
  # Function to run main in a separate thread
111
  def run_main():
 
105
 
106
  # Define progress_callback that updates steps_completed
107
  def progress_callback(step):
108
+ # Limit redundant prints by checking the step number
109
+ if not steps_completed or step > steps_completed[-1]:
110
+ steps_completed.append(step)
111
+ print(f"Progress: Step {step} completed.")
112
 
113
  # Function to run main in a separate thread
114
  def run_main():