rtamaki commited on
Commit
70f9c83
·
verified ·
1 Parent(s): f194126

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -1,9 +1,10 @@
1
- from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool
2
  import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
 
7
 
8
  from Gradio_UI import GradioUI
9
 
@@ -35,6 +36,15 @@ def get_current_time_in_timezone(timezone: str) -> str:
35
  except Exception as e:
36
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
37
 
 
 
 
 
 
 
 
 
 
38
  final_answer = FinalAnswerTool()
39
 
40
  # 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:
 
1
+ from smolagents import CodeAgent,DuckDuckGoSearchTool, HfApiModel,load_tool,tool,
2
  import datetime
3
  import requests
4
  import pytz
5
  import yaml
6
  from tools.final_answer import FinalAnswerTool
7
+ from typing import Any
8
 
9
  from Gradio_UI import GradioUI
10
 
 
36
  except Exception as e:
37
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
38
 
39
+ @tool
40
+ def tamaki_final_answer(answer: Any) -> Any:
41
+ """
42
+ Provides a final answer to the given problem.
43
+ Args:
44
+ answer: The final answer to the problem
45
+ """
46
+ return answer
47
+
48
  final_answer = FinalAnswerTool()
49
 
50
  # 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: