Kkanittha commited on
Commit
7402103
·
verified ·
1 Parent(s): e39eabd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -14,9 +14,11 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized.")
17
- openai_key = os.getenv("OPENAI_API_KEY")
18
- # Initialize the search tool
19
- model = OpenAIServerModel(model_id="o4-mini", api_key=openai_key)
 
 
20
  search_tool = DuckDuckGoSearchTool()
21
  # Initialize Agent
22
  self.agent = CodeAgent(
 
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized.")
17
+ model = InferenceClientModel(
18
+ model_id="Qwen/Qwen2.5-7B-Instruct", # or a smaller one like HuggingFaceTB/SmolLM2-1.7B-Instruct
19
+ provider="hf-inference",
20
+ token=os.getenv("HF_TOKEN"),
21
+ )
22
  search_tool = DuckDuckGoSearchTool()
23
  # Initialize Agent
24
  self.agent = CodeAgent(