LamiaYT commited on
Commit
e35415b
·
1 Parent(s): 7573f16
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -5,7 +5,7 @@ import pandas as pd
5
  import json
6
  import re
7
  import time
8
- from smolagents import CodeAgent, DuckDuckGoSearchTool, HfApiModel, tool
9
  from typing import Dict, Any, List
10
  import base64
11
  from io import BytesIO
@@ -17,8 +17,6 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
17
 
18
  # --- Custom Tools ---
19
 
20
- # --- Custom Tools ---
21
-
22
  @tool
23
  def serper_search(query: str) -> str:
24
  """Search the web using Serper API for current information and specific queries
@@ -239,8 +237,8 @@ class GAIAAgent:
239
  def __init__(self):
240
  print("Initializing GAIA Agent...")
241
 
242
- # Initialize model
243
- self.model = HfApiModel(
244
  model_id="microsoft/DialoGPT-medium",
245
  token=os.getenv("HUGGINGFACE_INFERENCE_TOKEN")
246
  )
 
5
  import json
6
  import re
7
  import time
8
+ from smolagents import CodeAgent, DuckDuckGoSearchTool, InferenceClientModel, tool
9
  from typing import Dict, Any, List
10
  import base64
11
  from io import BytesIO
 
17
 
18
  # --- Custom Tools ---
19
 
 
 
20
  @tool
21
  def serper_search(query: str) -> str:
22
  """Search the web using Serper API for current information and specific queries
 
237
  def __init__(self):
238
  print("Initializing GAIA Agent...")
239
 
240
+ # Initialize model with InferenceClientModel instead of HfApiModel
241
+ self.model = InferenceClientModel(
242
  model_id="microsoft/DialoGPT-medium",
243
  token=os.getenv("HUGGINGFACE_INFERENCE_TOKEN")
244
  )