Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -78,7 +78,7 @@ def generate_image(prompt, model, num_iterations, learning_rate, progress=gr.Pro
|
|
78 |
best_image, total_init_rewards, total_best_rewards = main(args, progress_callback)
|
79 |
|
80 |
# Return the path to the generated image
|
81 |
-
image_path = best_image
|
82 |
|
83 |
if os.path.exists(image_path):
|
84 |
iter_images = list_iter_images(save_dir)
|
|
|
78 |
best_image, total_init_rewards, total_best_rewards = main(args, progress_callback)
|
79 |
|
80 |
# Return the path to the generated image
|
81 |
+
image_path = f"{save_dir}/best_image.png"
|
82 |
|
83 |
if os.path.exists(image_path):
|
84 |
iter_images = list_iter_images(save_dir)
|