Spaces:
Sleeping
Sleeping
Update app.py
Browse files19 unmodified lines202122232425262728293019 unmodified lines"""try:search_tool = DuckDuckGoSearchTool()results = search_tool.run(f"latest business news about {topic}")return f"Here are the latest updates on {topic}:\n{results[:3]}" # Return top 3 resultsexcept Exception as e:return f"Error fetching news: {str(e)}"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.19 unmodified lines20212223242526272829303119 unmodified lines"""try:search_tool = DuckDuckGoSearchTool()results = search_tool.search(f"latest business news about {topic}") # Correct method callreturn f"Here are the latest updates on {topic}:\n" + "\n".join(results[:3]) # Top 3 resultsexcept Exception as e:return f"Error fetching news: {str(e)}"@tooldef get_current_time_in_timezone(timezone: str) -> str:"""A tool that fetches the current local time in a specified timezone.
app.py+3-2