Spaces:
Sleeping
Sleeping
Update app.py
Browse files12344 unmodified lines910111213141516171819202122from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,toolimport datetimeimport requestsimport pytz4 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef my_custom_tool(arg1:str, arg2:int)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool that does nothing yetArgs:arg1: the first argumentarg2: the second argument"""return "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str:12344 unmodified lines910111213141516171819202122232425262728from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool,web_search_toolimport datetimeimport requestsimport pytz4 unmodified lines# Below is an example of a tool that does nothing. Amaze us with your creativity !@tooldef compare_tool(arg1:str, arg2:str)-> str: #it's import to specify the return type#Keep this format for the description / args / args description but feel free to modify the tool"""A tool comparing to valuesArgs:arg1: the first argumentarg2: the second argument"""try:t_first = float(arg1)t_second = float(arg2)except:t_first = arg1t_second = arg2return str(t_first) + " is" + ("more " if t_first > t_second else "less ") + "than " + str(t_second)@tooldef get_current_time_in_timezone(timezone: str) -> str:
app.py+10-4