melomba2 commited on
Commit
3143b9f
·
verified ·
1 Parent(s): 310b522

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -15,7 +15,7 @@ ANSWER_CACHE = {}
15
  # --- Basic Agent Definition ---
16
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
17
 
18
- class SuperAgent:
19
  def __init__(self):
20
  print("Initializing Gemini Agent...")
21
  api_key = os.getenv("GOOGLE_API_KEY")
@@ -50,7 +50,7 @@ class SuperAgent:
50
  @spaces.GPU
51
  def run_and_submit_all( profile: gr.OAuthProfile | None):
52
  """
53
- Fetches all questions, runs the BasicAgent on them asynchronously,
54
  caches the answers, submits all answers, and displays the results.
55
  """
56
  # --- Determine HF Space Runtime URL and Repo URL ---
@@ -69,7 +69,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
69
 
70
  # 1. Instantiate Agent ( modify this part to create your agent)
71
  try:
72
- agent = BasicAgent()
73
  except Exception as e:
74
  print(f"Error instantiating agent: {e}")
75
  return f"Error initializing agent: {e}", None
 
15
  # --- Basic Agent Definition ---
16
  # ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
17
 
18
+ class GeminiAgent:
19
  def __init__(self):
20
  print("Initializing Gemini Agent...")
21
  api_key = os.getenv("GOOGLE_API_KEY")
 
50
  @spaces.GPU
51
  def run_and_submit_all( profile: gr.OAuthProfile | None):
52
  """
53
+ Fetches all questions, runs the GeminiAgent on them asynchronously,
54
  caches the answers, submits all answers, and displays the results.
55
  """
56
  # --- Determine HF Space Runtime URL and Repo URL ---
 
69
 
70
  # 1. Instantiate Agent ( modify this part to create your agent)
71
  try:
72
+ agent = GeminiAgent()
73
  except Exception as e:
74
  print(f"Error instantiating agent: {e}")
75
  return f"Error initializing agent: {e}", None