Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -21,8 +21,11 @@ def my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return
|
|
| 21 |
|
| 22 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 23 |
|
|
|
|
|
|
|
|
|
|
| 24 |
@tool
|
| 25 |
-
def generate_image(prompt: str) ->
|
| 26 |
"""Génère une image à partir d'une description textuelle.
|
| 27 |
|
| 28 |
Args:
|
|
|
|
| 21 |
|
| 22 |
image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
|
| 23 |
|
| 24 |
+
from smolagents.agent_types import AgentImage
|
| 25 |
+
|
| 26 |
+
|
| 27 |
@tool
|
| 28 |
+
def generate_image(prompt: str) -> AgentImage:
|
| 29 |
"""Génère une image à partir d'une description textuelle.
|
| 30 |
|
| 31 |
Args:
|