Spaces:
Build error
Build error
added an import to the agent
Browse files
app.py
CHANGED
|
@@ -3,13 +3,13 @@ import gradio as gr
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
-
from agent import
|
| 7 |
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 11 |
|
| 12 |
-
|
| 13 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 14 |
"""
|
| 15 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
@@ -31,7 +31,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
| 31 |
|
| 32 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 33 |
try:
|
| 34 |
-
agent =
|
| 35 |
except Exception as e:
|
| 36 |
print(f"Error instantiating agent: {e}")
|
| 37 |
return f"Error initializing agent: {e}", None
|
|
|
|
| 3 |
import requests
|
| 4 |
import inspect
|
| 5 |
import pandas as pd
|
| 6 |
+
from agent import build_agent
|
| 7 |
|
| 8 |
# (Keep Constants as is)
|
| 9 |
# --- Constants ---
|
| 10 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
| 11 |
|
| 12 |
+
agent = build_agent()
|
| 13 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
| 14 |
"""
|
| 15 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
|
|
| 31 |
|
| 32 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
| 33 |
try:
|
| 34 |
+
agent = build_agent()
|
| 35 |
except Exception as e:
|
| 36 |
print(f"Error instantiating agent: {e}")
|
| 37 |
return f"Error initializing agent: {e}", None
|