Model updated with qwen model

#6
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -14,8 +14,14 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized.")
 
 
 
 
 
 
17
  self.agent = CodeAgent(
18
- model = HfApiModel(),
19
  tools = [DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool()],
20
  additional_authorized_imports = ["pandas", "numpy"]
21
  )
@@ -26,7 +32,7 @@ class BasicAgent:
26
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
27
  If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
28
  """
29
- self.prompt = SYSTEM_PROMPT
30
 
31
  def __call__(self, question: str) -> str:
32
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized.")
17
+ model = HfApiModel(
18
+ max_tokens=2096,
19
+ temperature=0.5,
20
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
21
+ custom_role_conversions=None,
22
+ )
23
  self.agent = CodeAgent(
24
+ model = model,
25
  tools = [DuckDuckGoSearchTool(), WikipediaSearchTool(), VisitWebpageTool()],
26
  additional_authorized_imports = ["pandas", "numpy"]
27
  )
 
32
  If you are asked for a string, don't use articles, neither abbreviations (e.g. for cities), and write the digits in plain text unless specified otherwise.
33
  If you are asked for a comma separated list, apply the above rules depending of whether the element to be put in the list is a number or a string.
34
  """
35
+ self.agent.prompt_templates = SYSTEM_PROMPT
36
 
37
  def __call__(self, question: str) -> str:
38
  print(f"Agent received question (first 50 chars): {question[:50]}...")