Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -32,7 +32,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
|
|
32 |
except Exception as e:
|
33 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
34 |
|
35 |
-
|
36 |
final_answer = FinalAnswerTool()
|
37 |
|
38 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
@@ -55,7 +55,8 @@ with open("prompts.yaml", 'r') as stream:
|
|
55 |
agent = CodeAgent(
|
56 |
model=model,
|
57 |
tools=[final_answer,
|
58 |
-
get_current_time_in_timezone
|
|
|
59 |
max_steps=6,
|
60 |
verbosity_level=1,
|
61 |
grammar=None,
|
|
|
32 |
except Exception as e:
|
33 |
return f"Error fetching time for timezone '{timezone}': {str(e)}"
|
34 |
|
35 |
+
search_tool = DuckDuckGoSearchTool()
|
36 |
final_answer = FinalAnswerTool()
|
37 |
|
38 |
# If the agent does not answer, the model is overloaded, please use another model or the following Hugging Face Endpoint that also contains qwen2.5 coder:
|
|
|
55 |
agent = CodeAgent(
|
56 |
model=model,
|
57 |
tools=[final_answer,
|
58 |
+
get_current_time_in_timezone,
|
59 |
+
search_tool], ## add your tools here (don't remove final answer)
|
60 |
max_steps=6,
|
61 |
verbosity_level=1,
|
62 |
grammar=None,
|