Chadsglm commited on
Commit
05872c8
·
verified ·
1 Parent(s): 8f14000
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -39,13 +39,13 @@ def get_current_time_in_timezone(timezone: str) -> str:
39
  final_answer = FinalAnswerTool()
40
 
41
  # 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:
42
- # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
43
 
44
  model = HfApiModel(
45
  max_tokens=2096,
46
  temperature=0.5,
47
  #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
48
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
49
  custom_role_conversions=None,
50
  )
51
 
@@ -58,7 +58,7 @@ with open("prompts.yaml", 'r') as stream:
58
 
59
  agent = CodeAgent(
60
  model=model,
61
- tools=[final_answer], ## add your tools here (don't remove final answer)
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,
 
39
  final_answer = FinalAnswerTool()
40
 
41
  # 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:
42
+ model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud'
43
 
44
  model = HfApiModel(
45
  max_tokens=2096,
46
  temperature=0.5,
47
  #model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
48
+ model_id=model_id
49
  custom_role_conversions=None,
50
  )
51
 
 
58
 
59
  agent = CodeAgent(
60
  model=model,
61
+ tools=[final_answer, get_current_time_in_timezone, duckduckgo_web_search, visit_webpage], ## add your tools here (don't remove final answer)
62
  max_steps=6,
63
  verbosity_level=1,
64
  grammar=None,