fffiloni commited on
Commit
69fac63
·
verified ·
1 Parent(s): 3bec464

error_status was not defined

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -101,7 +101,8 @@ def generate_image(setup_args, num_iterations):
101
  torch.cuda.empty_cache() # Free up cached memory
102
  steps_completed = []
103
  result_container = {"best_image": None, "total_init_rewards": None, "total_best_rewards": None}
104
-
 
105
  # Define progress_callback that updates steps_completed
106
  def progress_callback(step):
107
  steps_completed.append(step)
 
101
  torch.cuda.empty_cache() # Free up cached memory
102
  steps_completed = []
103
  result_container = {"best_image": None, "total_init_rewards": None, "total_best_rewards": None}
104
+ error_status = {"error_occurred": False} # Shared dictionary to track error status
105
+
106
  # Define progress_callback that updates steps_completed
107
  def progress_callback(step):
108
  steps_completed.append(step)