Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,11 +10,11 @@ from Gradio_UI import GradioUI
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
-
def
|
| 14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 15 |
-
"""A tool that generates a
|
| 16 |
Args:
|
| 17 |
-
theme: A string representing
|
| 18 |
"""
|
| 19 |
try:
|
| 20 |
# Import tool from Hub
|
|
@@ -50,7 +50,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
| 50 |
|
| 51 |
agent = CodeAgent(
|
| 52 |
model=model,
|
| 53 |
-
tools=[final_answer,
|
| 54 |
max_steps=6,
|
| 55 |
verbosity_level=1,
|
| 56 |
grammar=None,
|
|
|
|
| 10 |
|
| 11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
| 12 |
@tool
|
| 13 |
+
def mutante_unicorn(theme:str) -> str: #it's import to specify the return type
|
| 14 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
| 15 |
+
"""A tool that generates a close-up photograph of a mutant unicorn based from the name of any animal.
|
| 16 |
Args:
|
| 17 |
+
theme: A string representing a name of any animal.
|
| 18 |
"""
|
| 19 |
try:
|
| 20 |
# Import tool from Hub
|
|
|
|
| 50 |
|
| 51 |
agent = CodeAgent(
|
| 52 |
model=model,
|
| 53 |
+
tools=[final_answer, mutante_unicorn], # add your tools here (don't remove final answer)
|
| 54 |
max_steps=6,
|
| 55 |
verbosity_level=1,
|
| 56 |
grammar=None,
|