Alexandros Popov commited on
Commit
e008df7
·
1 Parent(s): 9f850ce

reworked judges.

Browse files
Files changed (1) hide show
  1. judges.py +6 -4
judges.py CHANGED
@@ -86,8 +86,8 @@ def propose_operations(image_path: str, user_prompt: str = "Improve this image."
86
  "- add_grain\n"
87
  "In particular, you should use the methods that adjust colors luminance staturation and hue. "
88
  "I want at least 3 colors to be adjusted.\n"
89
- "When citing the methods, use a variation in percentage points, like +10% or -10%.\n"
90
- "Don't be subtle, the minimal increment is 10%.\n"
91
  )
92
  response = call_to_llm(
93
  image_path, model="Qwen/Qwen2.5-VL-72B-Instruct", system_prompt=system_prompt, user_prompt=user_prompt
@@ -140,7 +140,7 @@ def critic(new_image_path: str, original_image_path: str, user_prompt: str, list
140
  Returns:
141
  str: Feedback on the changes made to the image.
142
  """
143
-
144
  path_to_concat = concatenate_images_side_by_side(original_image_path, new_image_path)
145
 
146
  # iterate each time between the ops and the critic
@@ -157,11 +157,13 @@ def critic(new_image_path: str, original_image_path: str, user_prompt: str, list
157
  "The minimal increment is 10%. Don't be too subtle.\n"
158
  "You can refine the list of the modifications to apply to the image.\n"
159
  "You must not invent new methods or tools, only use the ones provided.\n"
 
 
160
  )
161
 
162
  response = call_to_llm(
163
  path_to_concat,
164
- model="google/gemma-3-27b-it",
165
  system_prompt=system_prompt,
166
  user_prompt=f"the user wishes for : {user_prompt}.\n The enhancement applied are {list_of_enhancements}",
167
  )
 
86
  "- add_grain\n"
87
  "In particular, you should use the methods that adjust colors luminance staturation and hue. "
88
  "I want at least 3 colors to be adjusted.\n"
89
+ "When citing the methods, describe qualitatively how much the effect should be applied : "
90
+ "a lot, bearly, to the maximum, ..."
91
  )
92
  response = call_to_llm(
93
  image_path, model="Qwen/Qwen2.5-VL-72B-Instruct", system_prompt=system_prompt, user_prompt=user_prompt
 
140
  Returns:
141
  str: Feedback on the changes made to the image.
142
  """
143
+ print("list_of_enhancements: ", list_of_enhancements)
144
  path_to_concat = concatenate_images_side_by_side(original_image_path, new_image_path)
145
 
146
  # iterate each time between the ops and the critic
 
157
  "The minimal increment is 10%. Don't be too subtle.\n"
158
  "You can refine the list of the modifications to apply to the image.\n"
159
  "You must not invent new methods or tools, only use the ones provided.\n"
160
+ "You must include in your answer a rate out of 10 of the image."
161
+ "If you rate the rate above 8/10, just accept the image as it is."
162
  )
163
 
164
  response = call_to_llm(
165
  path_to_concat,
166
+ model="Qwen/Qwen2.5-VL-72B-Instruct",
167
  system_prompt=system_prompt,
168
  user_prompt=f"the user wishes for : {user_prompt}.\n The enhancement applied are {list_of_enhancements}",
169
  )