Alexandros Popov
commited on
Commit
·
b6c2b4a
1
Parent(s):
ab94812
removed art director.
Browse files
agents.py
CHANGED
|
@@ -58,32 +58,6 @@ picture_operator = CodeAgent(
|
|
| 58 |
managed_agents=[],
|
| 59 |
)
|
| 60 |
|
| 61 |
-
art_director_model = InferenceClientModel(
|
| 62 |
-
model_id="meta-llama/Llama-3.3-70B-Instruct",
|
| 63 |
-
provider="nebius",
|
| 64 |
-
token=HUGGING_FACE_TOKEN,
|
| 65 |
-
)
|
| 66 |
-
|
| 67 |
-
art_director_prompt = (
|
| 68 |
-
"You manage the relations between the art director, the picture operator and the critic."
|
| 69 |
-
"You must present the images to improve to the art director, who will propose operations to apply to the image."
|
| 70 |
-
"The quantitative parameters in operations are hard to predict, so the art director will propose operations "
|
| 71 |
-
"with a percentage change, like +10% or -5%."
|
| 72 |
-
"You must pass those operations to the picture operator, who will apply them to the image "
|
| 73 |
-
"and refine the percentage changes with the help of the critic."
|
| 74 |
-
"Once all operations are applied, and the critic is happy, you can save the final image."
|
| 75 |
-
"You must not evaluate the image yourself, only pass it to the critic."
|
| 76 |
-
"You must not propose operations yourself, only pass them to the picture operator."
|
| 77 |
-
"You must not invent new methods or tools, only use the ones provided."
|
| 78 |
-
)
|
| 79 |
-
art_director = CodeAgent(
|
| 80 |
-
tools=[jdg.critic],
|
| 81 |
-
model=art_director_model,
|
| 82 |
-
managed_agents=[picture_operator],
|
| 83 |
-
description=art_director_prompt,
|
| 84 |
-
name="Manager",
|
| 85 |
-
)
|
| 86 |
-
|
| 87 |
|
| 88 |
def resize_longest_side_to_500(image_path, output_path):
|
| 89 |
"""
|
|
|
|
| 58 |
managed_agents=[],
|
| 59 |
)
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
|
| 62 |
def resize_longest_side_to_500(image_path, output_path):
|
| 63 |
"""
|