Facelook commited on
Commit
42a3c55
·
1 Parent(s): 90ee81a

Changed to use SmolagentAssistant.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
3
  import requests
4
  import inspect
5
  import pandas as pd
6
- from smolagents import Agent # Import the smolagents library [[1]]
7
 
8
  # (Keep Constants as is)
9
  # --- Constants ---
@@ -14,7 +14,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized with smolagents.")
17
- self.agent = Agent() # Initialize smolagents' Agent [[2]]
18
 
19
  def __call__(self, question: str) -> str:
20
  print(f"Agent received question (first 50 chars): {question[:50]}...")
 
3
  import requests
4
  import inspect
5
  import pandas as pd
6
+ from smolagents import SmolagentAssistant # Import the correct class from smolagents
7
 
8
  # (Keep Constants as is)
9
  # --- Constants ---
 
14
  class BasicAgent:
15
  def __init__(self):
16
  print("BasicAgent initialized with smolagents.")
17
+ self.agent = SmolagentAssistant() # Initialize smolagents' Assistant
18
 
19
  def __call__(self, question: str) -> str:
20
  print(f"Agent received question (first 50 chars): {question[:50]}...")