Cankan commited on
Commit
9fb2c0b
·
verified ·
1 Parent(s): 2de34a2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -1,4 +1,4 @@
1
- from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, load_tool, tool
2
  import datetime
3
  import requests
4
  import pytz
@@ -6,6 +6,7 @@ import yaml
6
  from tools.final_answer import FinalAnswerTool
7
  from Gradio_UI import GradioUI
8
 
 
9
  # --- Tools ---
10
  @tool
11
  def my_custom_tool(arg1: str, arg2: int) -> str:
@@ -41,10 +42,10 @@ def get_current_time_in_timezone(timezone: str) -> str:
41
  final_answer = FinalAnswerTool()
42
 
43
  # --- Model (use this on HF Spaces; it reads HF_TOKEN automatically) ---
44
- model = InferenceClientModel(
 
45
  max_tokens=2096,
46
  temperature=0.5,
47
- model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
48
  custom_role_conversions=None,
49
  )
50
 
 
1
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, load_tool, tool
2
  import datetime
3
  import requests
4
  import pytz
 
6
  from tools.final_answer import FinalAnswerTool
7
  from Gradio_UI import GradioUI
8
 
9
+
10
  # --- Tools ---
11
  @tool
12
  def my_custom_tool(arg1: str, arg2: int) -> str:
 
42
  final_answer = FinalAnswerTool()
43
 
44
  # --- Model (use this on HF Spaces; it reads HF_TOKEN automatically) ---
45
+ model = HfApiModel(
46
+ model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
47
  max_tokens=2096,
48
  temperature=0.5,
 
49
  custom_role_conversions=None,
50
  )
51