Spaces:
Sleeping
Sleeping
Feat: Typo fixed
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ from Gradio_UI import GradioUI
|
|
11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
12 |
# In this case, the user should input the name of the character to get the quote :)
|
13 |
@tool
|
14 |
-
def
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
"""
|
17 |
Fetches a quote from a Star Trek character.
|
@@ -41,7 +41,7 @@ def get_star_trek_quote(character: str)-> str: #it's import to specify the retur
|
|
41 |
}
|
42 |
|
43 |
# If the character exists in the dictionary, return a quote
|
44 |
-
if character in
|
45 |
return quotes[character][0] # Fetch the first character
|
46 |
else:
|
47 |
return f"Sorry, no quotes available for {character}. Please provide a valid Star Trek character name."
|
@@ -117,7 +117,7 @@ with open("prompts.yaml", 'r') as stream:
|
|
117 |
|
118 |
agent = CodeAgent(
|
119 |
model=model,
|
120 |
-
tools=[final_answer,
|
121 |
max_steps=6,
|
122 |
verbosity_level=1,
|
123 |
grammar=None,
|
|
|
11 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
12 |
# In this case, the user should input the name of the character to get the quote :)
|
13 |
@tool
|
14 |
+
def get_star_trek_quotes(character: str)-> str: #it's import to specify the return type
|
15 |
#Keep this format for the description / args / args description but feel free to modify the tool
|
16 |
"""
|
17 |
Fetches a quote from a Star Trek character.
|
|
|
41 |
}
|
42 |
|
43 |
# If the character exists in the dictionary, return a quote
|
44 |
+
if character in quotes:
|
45 |
return quotes[character][0] # Fetch the first character
|
46 |
else:
|
47 |
return f"Sorry, no quotes available for {character}. Please provide a valid Star Trek character name."
|
|
|
117 |
|
118 |
agent = CodeAgent(
|
119 |
model=model,
|
120 |
+
tools=[final_answer, get_star_trek_quotes, analyze_species_difference, generate_starship_image], ## add your tools here (don't remove final answer)
|
121 |
max_steps=6,
|
122 |
verbosity_level=1,
|
123 |
grammar=None,
|