Spaces:
Sleeping
Sleeping
add letter count tool
Browse files6 unmodified lines7891011121314151617181920212232 unmodified lines555657585960616 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:32 unmodified linesagent = CodeAgent(model=model,tools=[final_answer], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,6 unmodified lines789101112131415161718192032 unmodified lines535455565758596 unmodified linesfrom Gradio_UI import GradioUI@tooldef letter_count_tool(word:str)-> int:"""A tool that counts the number of letters in a wordArgs:word: the word to count the letters for"""return len(word)@tooldef get_current_time_in_timezone(timezone: str) -> str:32 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, image_generation_tool, get_current_time_in_timezone, letter_count_tool], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+6-8