Gercho312 commited on
Commit
859abe0
·
verified ·
1 Parent(s): 8ef3396

Updated app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -9,7 +9,7 @@ from Gradio_UI import GradioUI
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
- def city_stats(city:str)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
 
15
  """A tool that fetches stats about the specified city.
@@ -25,6 +25,8 @@ def city_stats(city:str)-> str: #it's import to specify the return type
25
  population = data[0]["population"]
26
  else:
27
  print("Error:", response.status_code)
 
 
28
 
29
 
30
  return f"{city} is part of {country} and has a population of {population}"
@@ -62,7 +64,7 @@ with open("prompts.yaml", 'r') as stream:
62
 
63
  agent = CodeAgent(
64
  model=model,
65
- tools=[final_answer], ## add your tools here (don't remove final answer)
66
  max_steps=6,
67
  verbosity_level=1,
68
  grammar=None,
 
9
 
10
  # Below is an example of a tool that does nothing. Amaze us with your creativity !
11
  @tool
12
+ def get_city_stats(city:str)-> str: #it's import to specify the return type
13
  #Keep this format for the description / args / args description but feel free to modify the tool
14
 
15
  """A tool that fetches stats about the specified city.
 
25
  population = data[0]["population"]
26
  else:
27
  print("Error:", response.status_code)
28
+ country = "Argentina" #default response
29
+ population = "10000000" #default response
30
 
31
 
32
  return f"{city} is part of {country} and has a population of {population}"
 
64
 
65
  agent = CodeAgent(
66
  model=model,
67
+ tools=[final_answer, image_generation_tool, get_current_time_in_timezone,get_city_stats], ## add your tools here (don't remove final answer)
68
  max_steps=6,
69
  verbosity_level=1,
70
  grammar=None,