Tanya8901 commited on
Commit
c6204ba
·
verified ·
1 Parent(s): ad58cbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -1,7 +1,8 @@
1
- import http
2
  from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
3
  import datetime
4
  import requests
 
5
  import pytz
6
  import yaml
7
  from tools.final_answer import FinalAnswerTool
@@ -17,7 +18,8 @@ def my_custom_tool(year:int)-> str: #it's import to specify the return type
17
  Args:
18
  year: an integer representing a year
19
  """
20
- return http.get('https://datausa.io/api/data?drilldowns=Nation&measures=Population')
 
21
 
22
  @tool
23
  def get_current_time_in_timezone(timezone: str) -> str:
 
1
+
2
  from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
3
  import datetime
4
  import requests
5
+ import json
6
  import pytz
7
  import yaml
8
  from tools.final_answer import FinalAnswerTool
 
18
  Args:
19
  year: an integer representing a year
20
  """
21
+ response = requests.get('https://datausa.io/api/data?drilldowns=Nation&measures=Population')
22
+ return response.json()
23
 
24
  @tool
25
  def get_current_time_in_timezone(timezone: str) -> str: