GusLovesMath commited on
Commit
9f16818
·
verified ·
1 Parent(s): d31afb6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -9
app.py CHANGED
@@ -62,18 +62,17 @@ def get_current_time_in_timezone(timezone: str) -> str:
62
 
63
 
64
 
65
- tool_list = [
66
- final_answer,
67
- get_approximate_integral,
68
- get_current_time_in_timezone,
69
- image_generation_tool, # the hub‑loaded tool
70
- DuckDuckGoSearchTool(), # plain class → instantiate
71
- ]
72
-
73
-
74
  # 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:
75
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
 
76
  final_answer = FinalAnswerTool()
 
 
 
 
 
 
 
77
 
78
  model = HfApiModel(
79
  max_tokens=2096,
@@ -86,6 +85,14 @@ model = HfApiModel(
86
  # Import tool from Hub
87
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
88
 
 
 
 
 
 
 
 
 
89
  # Load system prompt from prompt.yaml file
90
  with open("prompts.yaml", 'r') as stream:
91
  prompt_templates = yaml.safe_load(stream)
 
62
 
63
 
64
 
 
 
 
 
 
 
 
 
 
65
  # 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:
66
  # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
67
+ # final_answer = FinalAnswerTool()
68
  final_answer = FinalAnswerTool()
69
+ model = HfApiModel(
70
+ max_tokens=2096,
71
+ temperature=0.5,
72
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
73
+ custom_role_conversions=None,
74
+ )
75
+
76
 
77
  model = HfApiModel(
78
  max_tokens=2096,
 
85
  # Import tool from Hub
86
  image_generation_tool = load_tool("agents-course/text-to-image", trust_remote_code=True)
87
 
88
+ tool_list = [
89
+ final_answer,
90
+ get_approximate_integral,
91
+ get_current_time_in_timezone,
92
+ image_generation_tool, # the hub‑loaded tool
93
+ DuckDuckGoSearchTool(), # plain class → instantiate
94
+ ]
95
+
96
  # Load system prompt from prompt.yaml file
97
  with open("prompts.yaml", 'r') as stream:
98
  prompt_templates = yaml.safe_load(stream)