Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -35,15 +35,6 @@ class GAIAAgent:
|
|
35 |
print(f"Agent error: {e}")
|
36 |
return f"AGENT ERROR: {e}"
|
37 |
|
38 |
-
# class BasicAgent:
|
39 |
-
# def __init__(self):
|
40 |
-
# print("BasicAgent initialized.")
|
41 |
-
# def __call__(self, question: str) -> str:
|
42 |
-
# print(f"Agent received question (first 50 chars): {question[:50]}...")
|
43 |
-
# fixed_answer = "This is a default answer."
|
44 |
-
# print(f"Agent returning fixed answer: {fixed_answer}")
|
45 |
-
# return fixed_answer
|
46 |
-
|
47 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
48 |
"""
|
49 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
@@ -72,14 +63,6 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
72 |
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
73 |
print(f"Agent code URL: {agent_code}")
|
74 |
|
75 |
-
# try:
|
76 |
-
# agent = BasicAgent()
|
77 |
-
# except Exception as e:
|
78 |
-
# print(f"Error instantiating agent: {e}")
|
79 |
-
# return f"Error initializing agent: {e}", None
|
80 |
-
# In the case of an app running as a hugging Face space, this link points toward your codebase ( usefull for others so please keep it public)
|
81 |
-
# agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
82 |
-
# print(agent_code)
|
83 |
|
84 |
# 2. Fetch Questions
|
85 |
print(f"Fetching questions from: {questions_url}")
|
|
|
35 |
print(f"Agent error: {e}")
|
36 |
return f"AGENT ERROR: {e}"
|
37 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
def run_and_submit_all( profile: gr.OAuthProfile | None):
|
39 |
"""
|
40 |
Fetches all questions, runs the BasicAgent on them, submits all answers,
|
|
|
63 |
agent_code = f"https://huggingface.co/spaces/{space_id}/tree/main"
|
64 |
print(f"Agent code URL: {agent_code}")
|
65 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
66 |
|
67 |
# 2. Fetch Questions
|
68 |
print(f"Fetching questions from: {questions_url}")
|