Spaces:
Sleeping
Sleeping
Update app.py
Browse files8 unmodified lines910111213141516171819202122232434 unmodified lines596061626364658 unmodified linesfrom Gradio_UI import GradioUI# 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:34 unmodified linesagent = CodeAgent(model=model,tools=[web_search, visit_webpage, get_current_time_in_timezone, final_answer], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,8 unmodified lines9101112131415161718192021222324252634 unmodified lines616263646566678 unmodified linesfrom Gradio_UI import GradioUI@tooldef get_top_keywods_by_city(city: str, time: int)-> str[]:"""A tool that returns a list with top 5 most popular things to do based on the cityArgs:city: A string representing a citytime: A timestamp representing a current time in a city"""print(city, time)if city == "Athens":return ["Acropolis", "Philosofy", "Sea", "Food", "Drinks"]return ["Other"]@tooldef get_current_time_in_timezone(timezone: str) -> str:34 unmodified linesagent = CodeAgent(model=model,tools=[get_current_time_in_timezone, get_top_keywods_by_city, web_search, visit_webpage, final_answer], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+10-8