Spaces:
Sleeping
Sleeping
Update app.py
Browse files3 unmodified lines4567899 unmodified lines19202122232431 unmodified lines565758596061623 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom Gradio_UI import GradioUI9 unmodified linesreturn "What magic will you build ?"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.31 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone, image_generation_tool], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,3 unmodified lines45678910119 unmodified lines2122232425262728293031323331 unmodified lines656667686970713 unmodified linesimport pytzimport yamlfrom tools.final_answer import FinalAnswerToolfrom llama_index.tools.wikipedia import WikipediaToolSpecfrom llama_index.agent.openai import OpenAIAgentfrom Gradio_UI import GradioUI9 unmodified linesreturn "What magic will you build ?"tool_spec = WikipediaToolSpec()agent = OpenAIAgent.from_tools(tool_spec.to_tool_list())#agent.chat("Who is Ben Afflecks spouse?")@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.31 unmodified linesagent = CodeAgent(model=model,tools=[final_answer, get_current_time_in_timezone, image_generation_tool, agent], ## add your tools here (don't remove final answer)max_steps=6,verbosity_level=1,grammar=None,
app.py+10-1