sqfoo commited on
Commit
593bf35
·
verified ·
1 Parent(s): e1dc6ad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -8,7 +8,18 @@ import pandas as pd
8
  # --- Constants ---
9
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
10
 
11
- from agent import BasicAgent
 
 
 
 
 
 
 
 
 
 
 
12
 
13
  def run_and_submit_all( profile: gr.OAuthProfile | None):
14
  """
 
8
  # --- Constants ---
9
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
10
 
11
+ from gemini_agent import GEMINI_AGENT
12
+ class BasicAgent:
13
+ def __init__(self):
14
+ self.agent = GEMINI_AGENT()
15
+
16
+ def __call__(self, task: dict) -> str:
17
+ try:
18
+ response = self.agent(task)
19
+ return response
20
+ except Exception as e:
21
+ print(f"Error is raised: {str(e)}")
22
+ return "Agent could not complete this task"
23
 
24
  def run_and_submit_all( profile: gr.OAuthProfile | None):
25
  """