eigbney commited on
Commit
ace4882
·
verified ·
1 Parent(s): 3d0e99b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -4,22 +4,19 @@ import requests
4
  import pandas as pd
5
  from smolagents import CodeAgent, DuckDuckGoSearchTool, LiteLLMModel
6
 
7
- # --- Constants ---
8
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
9
 
10
- # --- Advanced Agent Definition ---
11
  class BasicAgent:
12
  def __init__(self):
13
- # Using a powerful model that can handle logic and tool use
14
- self.model = HfApiModel(model_id="Qwen/Qwen2.5-72B-Instruct")
15
 
16
- # We give the agent search capabilities and a Python interpreter
17
  self.agent = CodeAgent(
18
  tools=[DuckDuckGoSearchTool()],
19
  model=self.model,
20
  add_base_tools=True
21
  )
22
- print("Advanced smolagent initialized.")
23
 
24
  def __call__(self, question: str) -> str:
25
  # Prompting for Exact Match scoring
 
4
  import pandas as pd
5
  from smolagents import CodeAgent, DuckDuckGoSearchTool, LiteLLMModel
6
 
 
7
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
8
 
 
9
  class BasicAgent:
10
  def __init__(self):
11
+
12
+ self.model = LiteLLMModel(model_id="huggingface/Qwen/Qwen2.5-72B-Instruct")
13
 
 
14
  self.agent = CodeAgent(
15
  tools=[DuckDuckGoSearchTool()],
16
  model=self.model,
17
  add_base_tools=True
18
  )
19
+ print("Advanced smolagent initialized with LiteLLM.")
20
 
21
  def __call__(self, question: str) -> str:
22
  # Prompting for Exact Match scoring