Spaces:
Sleeping
Sleeping
back to dummy
Browse files
app.py
CHANGED
|
@@ -15,16 +15,17 @@ class BasicAgent:
|
|
| 15 |
def __init__(self):
|
| 16 |
print("Initializing the BasicAgent")
|
| 17 |
|
| 18 |
-
api_key = os.getenv('GOOGLE_API_KEY')
|
| 19 |
-
if not api_key:
|
| 20 |
-
|
| 21 |
|
| 22 |
-
self.agent = GaiaAgent(api_key=api_key)
|
| 23 |
print("GeminiAgent initialized successfully")
|
| 24 |
|
| 25 |
def __call__(self, question: str) -> str:
|
| 26 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 27 |
-
final_answer = self.agent.run(question)
|
|
|
|
| 28 |
print(f"Agent returning fixed answer: {final_answer}")
|
| 29 |
return final_answer
|
| 30 |
|
|
@@ -85,8 +86,9 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
|
|
| 85 |
for item in questions_data:
|
| 86 |
task_id = item.get("task_id")
|
| 87 |
question_text = item.get("question")
|
| 88 |
-
time.sleep(10)
|
| 89 |
-
print("PAUSED BEFORE question", question_text)
|
|
|
|
| 90 |
if not task_id or question_text is None:
|
| 91 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 92 |
continue
|
|
|
|
| 15 |
def __init__(self):
|
| 16 |
print("Initializing the BasicAgent")
|
| 17 |
|
| 18 |
+
# api_key = os.getenv('GOOGLE_API_KEY')
|
| 19 |
+
# if not api_key:
|
| 20 |
+
# raise ValueError("GOOGLE_API_KEY environment variable not set.")
|
| 21 |
|
| 22 |
+
# self.agent = GaiaAgent(api_key=api_key)
|
| 23 |
print("GeminiAgent initialized successfully")
|
| 24 |
|
| 25 |
def __call__(self, question: str) -> str:
|
| 26 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 27 |
+
# final_answer = self.agent.run(question)
|
| 28 |
+
final_answer = "dummy answer"
|
| 29 |
print(f"Agent returning fixed answer: {final_answer}")
|
| 30 |
return final_answer
|
| 31 |
|
|
|
|
| 86 |
for item in questions_data:
|
| 87 |
task_id = item.get("task_id")
|
| 88 |
question_text = item.get("question")
|
| 89 |
+
# time.sleep(10)
|
| 90 |
+
# print("PAUSED BEFORE question", question_text)
|
| 91 |
+
print("Question:", question_text)
|
| 92 |
if not task_id or question_text is None:
|
| 93 |
print(f"Skipping item with missing task_id or question: {item}")
|
| 94 |
continue
|