Howard08 commited on
Commit
a08bb3c
·
verified ·
1 Parent(s): e83bc85

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -1,8 +1,8 @@
1
  from smolagents import (
2
  CodeAgent,
3
  DuckDuckGoSearchTool,
4
- HuggingFaceInferenceModel,
5
  load_tool,
 
6
  tool,
7
  )
8
 
@@ -31,10 +31,12 @@ def get_current_time_in_timezone(timezone: str) -> str:
31
 
32
  final_answer = FinalAnswerTool()
33
 
34
- model = HuggingFaceInferenceModel(
 
 
35
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
36
- temperature=0.5,
37
  max_tokens=2048,
 
38
  )
39
 
40
  image_generation_tool = load_tool(
 
1
  from smolagents import (
2
  CodeAgent,
3
  DuckDuckGoSearchTool,
 
4
  load_tool,
5
+ load_model,
6
  tool,
7
  )
8
 
 
31
 
32
  final_answer = FinalAnswerTool()
33
 
34
+ # ✅ VERSION-SAFE MODEL LOADING
35
+ model = load_model(
36
+ "hf-inference",
37
  model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
 
38
  max_tokens=2048,
39
+ temperature=0.5,
40
  )
41
 
42
  image_generation_tool = load_tool(