aubrigene949 commited on
Commit
359db5e
·
verified ·
1 Parent(s): 4aa2a54

Update app.py

Browse files

Trying a different model id

Files changed (1) hide show
  1. app.py +21 -21
app.py CHANGED
@@ -17,25 +17,25 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
17
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
18
  class BasicAgent:
19
  def __init__(self):
20
- self.model = HfApiModel(
21
- max_tokens=2096,
22
- temperature=0.5,
23
- # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
24
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
25
- custom_role_conversions=None,
26
- )
27
- self.final_answer = FinalAnswerTool()
28
- self.agent = CodeAgent(
29
- model=self.model,
30
- tools=[self.final_answer], ## add your tools here (don't remove final answer)
31
- max_steps=6,
32
- verbosity_level=1,
33
- grammar=None,
34
- planning_interval=None,
35
- name=None,
36
- description=None,
37
- # prompt_templates=prompt_templates
38
- )
39
  print("BasicAgent initialized.")
40
  print(f"Agent answered me sumthin: {self.agent('How are you today?')}")
41
  def __call__(self, question: str) -> str:
@@ -71,8 +71,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
71
  model = HfApiModel(
72
  max_tokens=2096,
73
  temperature=0.5,
74
- # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
75
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
76
  custom_role_conversions=None,
77
  )
78
  final_answer = FinalAnswerTool()
 
17
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
18
  class BasicAgent:
19
  def __init__(self):
20
+ # self.model = HfApiModel(
21
+ # max_tokens=2096,
22
+ # temperature=0.5,
23
+ # # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
24
+ # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
25
+ # custom_role_conversions=None,
26
+ # )
27
+ # self.final_answer = FinalAnswerTool()
28
+ # self.agent = CodeAgent(
29
+ # model=self.model,
30
+ # tools=[self.final_answer], ## add your tools here (don't remove final answer)
31
+ # max_steps=6,
32
+ # verbosity_level=1,
33
+ # grammar=None,
34
+ # planning_interval=None,
35
+ # name=None,
36
+ # description=None,
37
+ # # prompt_templates=prompt_templates
38
+ # )
39
  print("BasicAgent initialized.")
40
  print(f"Agent answered me sumthin: {self.agent('How are you today?')}")
41
  def __call__(self, question: str) -> str:
 
71
  model = HfApiModel(
72
  max_tokens=2096,
73
  temperature=0.5,
74
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
75
+ # model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
76
  custom_role_conversions=None,
77
  )
78
  final_answer = FinalAnswerTool()