Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import requests
|
|
3 |
import pandas as pd
|
4 |
import gradio as gr
|
5 |
|
6 |
-
from agent import BasicAgent
|
7 |
|
8 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
9 |
|
@@ -11,6 +11,7 @@ class GAIAAgent:
|
|
11 |
def __init__(self):
|
12 |
self.agent = BasicAgent()
|
13 |
def __call__(self, question: str, task_id: str) -> str:
|
|
|
14 |
return self.agent(question, task_id)
|
15 |
|
16 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
@@ -63,7 +64,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
63 |
except Exception as e:
|
64 |
return f"Submission Failed: {e}", pd.DataFrame(results_log)
|
65 |
|
66 |
-
# --- Gradio Interface ---
|
67 |
with gr.Blocks() as demo:
|
68 |
gr.Markdown("# Basic Agent Evaluation Runner")
|
69 |
gr.Markdown("""
|
|
|
3 |
import pandas as pd
|
4 |
import gradio as gr
|
5 |
|
6 |
+
from agent import BasicAgent
|
7 |
|
8 |
DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
9 |
|
|
|
11 |
def __init__(self):
|
12 |
self.agent = BasicAgent()
|
13 |
def __call__(self, question: str, task_id: str) -> str:
|
14 |
+
# Pass both question and task_id to the agent
|
15 |
return self.agent(question, task_id)
|
16 |
|
17 |
def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
|
64 |
except Exception as e:
|
65 |
return f"Submission Failed: {e}", pd.DataFrame(results_log)
|
66 |
|
67 |
+
# --- Gradio Interface matching original benchmark ---
|
68 |
with gr.Blocks() as demo:
|
69 |
gr.Markdown("# Basic Agent Evaluation Runner")
|
70 |
gr.Markdown("""
|