Alexandros Popov commited on
Commit
69ebb65
·
1 Parent(s): ec9f581

fixed critic.

Browse files
Files changed (1) hide show
  1. judges.py +1 -1
judges.py CHANGED
@@ -154,7 +154,7 @@ def critic(output_directory: str, original_image_path: str, user_prompt: str, li
154
  trial_files = [f for f in os.listdir(output_directory) if re.match(r"trial_\d+\.jpeg$", f)]
155
  # Sort files by descending integer i
156
  trial_files.sort(key=lambda x: (int(m.group(1)) if (m := re.search(r"trial_(\d+)\.jpeg$", x)) else -1))
157
- new_image_path = os.path.join(output_directory, trial_files[0])
158
  path_to_concat = concatenate_images_side_by_side(original_image_path, new_image_path)
159
 
160
  # iterate each time between the ops and the critic
 
154
  trial_files = [f for f in os.listdir(output_directory) if re.match(r"trial_\d+\.jpeg$", f)]
155
  # Sort files by descending integer i
156
  trial_files.sort(key=lambda x: (int(m.group(1)) if (m := re.search(r"trial_(\d+)\.jpeg$", x)) else -1))
157
+ new_image_path = os.path.join(output_directory, trial_files[-1])
158
  path_to_concat = concatenate_images_side_by_side(original_image_path, new_image_path)
159
 
160
  # iterate each time between the ops and the critic