zmeeks commited on
Commit
73b10d1
·
verified ·
1 Parent(s): 56d2ab7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import inspect
5
  import pandas as pd
6
 
7
  try:
8
- from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel
9
  SMOLAGENTS_AVAILABLE = True
10
  except ImportError:
11
  print("Warning: smolagents not available, using fallback implementation")
@@ -44,7 +44,12 @@ class BasicAgent:
44
  if SMOLAGENTS_AVAILABLE:
45
  try:
46
  # Initialize the model (from Unit 2)
47
- self.model = HfApiModel()
 
 
 
 
 
48
 
49
  # Create CodeAgent with DuckDuckGoSearchTool (core Unit 2 concept)
50
  self.agent = CodeAgent(
 
5
  import pandas as pd
6
 
7
  try:
8
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel
9
  SMOLAGENTS_AVAILABLE = True
10
  except ImportError:
11
  print("Warning: smolagents not available, using fallback implementation")
 
44
  if SMOLAGENTS_AVAILABLE:
45
  try:
46
  # Initialize the model (from Unit 2)
47
+ self.model = InferenceClientModel(
48
+ max_tokens=2096,
49
+ temperature=0.5,
50
+ model_id='Qwen/Qwen2.5-Coder-32B-Instruct',
51
+ custom_role_conversions=None,
52
+ )
53
 
54
  # Create CodeAgent with DuckDuckGoSearchTool (core Unit 2 concept)
55
  self.agent = CodeAgent(