fffiloni commited on
Commit
76c6d78
·
verified ·
1 Parent(s): 5916053

try display current image live

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -74,6 +74,8 @@ def generate_image(prompt, model, num_iterations, learning_rate, progress=gr.Pro
74
  # Run the main function with progress tracking
75
  def progress_callback(step):
76
  progress(step / num_iterations, f"Iteration {step}/{num_iterations}")
 
 
77
 
78
  best_image, total_init_rewards, total_best_rewards = main(args, progress_callback)
79
 
 
74
  # Run the main function with progress tracking
75
  def progress_callback(step):
76
  progress(step / num_iterations, f"Iteration {step}/{num_iterations}")
77
+ current_image = f"{save_dir}/{step}.png"
78
+ yield current_image, f"Iteration {step}/{num_iterations}", None
79
 
80
  best_image, total_init_rewards, total_best_rewards = main(args, progress_callback)
81