thatting commited on
Commit
4955613
·
verified ·
1 Parent(s): 2a60afe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -12,7 +12,7 @@ import yaml
12
 
13
  # Import modules and classes from openai and smolagents
14
  # import openai
15
- from smolagents import CodeAgent, HfApiModel, DuckDuckGoSearchTool, VisitWebpageTool
16
  from tools import SimplifyAnswerTool
17
 
18
  # Set API keys
@@ -22,11 +22,11 @@ from tools import SimplifyAnswerTool
22
 
23
  # Create model
24
  # model = OpenAIServerModel(model_id="gpt-4o")
25
- model = HfApiModel(
26
  max_tokens=2096,
27
  temperature=0.5,
28
  # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
29
- model_id='https://pflgm2locj2t89co.us-east-1.aws.endpoints.huggingface.cloud',
30
  custom_role_conversions=None,
31
  )
32
 
 
12
 
13
  # Import modules and classes from openai and smolagents
14
  # import openai
15
+ from smolagents import CodeAgent, InferenceClientModel, DuckDuckGoSearchTool, VisitWebpageTool
16
  from tools import SimplifyAnswerTool
17
 
18
  # Set API keys
 
22
 
23
  # Create model
24
  # model = OpenAIServerModel(model_id="gpt-4o")
25
+ model = InferenceClientModel(
26
  max_tokens=2096,
27
  temperature=0.5,
28
  # model_id='Qwen/Qwen2.5-Coder-32B-Instruct',# it is possible that this model may be overloaded
29
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
30
  custom_role_conversions=None,
31
  )
32