Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,46 +69,46 @@ agent_codeagent = CodeAgent(
|
|
| 69 |
)
|
| 70 |
|
| 71 |
|
| 72 |
-
#def run_and_submit_one():
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
|
| 100 |
-
|
| 101 |
-
|
| 102 |
-
|
| 103 |
-
|
| 104 |
-
|
| 105 |
-
|
| 106 |
-
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
|
| 111 |
-
|
| 112 |
|
| 113 |
#run_and_submit_one()
|
| 114 |
|
|
|
|
| 69 |
)
|
| 70 |
|
| 71 |
|
| 72 |
+
# #def run_and_submit_one():
|
| 73 |
+
# # 1. Instantiate Agent ( modify this part to create your agent)
|
| 74 |
+
# try:
|
| 75 |
+
# #agent = BasicAgent()
|
| 76 |
+
# agent = agent_codeagent
|
| 77 |
|
| 78 |
+
# except Exception as e:
|
| 79 |
+
# print(f"Error instantiating agent: {e}")
|
| 80 |
+
# return f"Error initializing agent: {e}", None
|
| 81 |
|
| 82 |
+
# # 2. Fetch Questions by loading from local json
|
| 83 |
+
# status_message, questions_data = load_questions_from_file()
|
| 84 |
+
|
| 85 |
+
# if questions_data is not None and len(questions_data) > 0:
|
| 86 |
+
# first_question = questions_data[0]
|
| 87 |
+
# print("First question object:", first_question)
|
| 88 |
+
|
| 89 |
+
# #To test
|
| 90 |
+
# question_text = first_question.get("question")
|
| 91 |
+
# task_id = first_question.get("task_id")
|
| 92 |
+
# print(f"\nTask ID: {task_id}")
|
| 93 |
+
# print(f"Question: {question_text}")
|
| 94 |
+
# else:
|
| 95 |
+
# print("No data found.")
|
| 96 |
+
|
| 97 |
+
# # 3. Run your Agent
|
| 98 |
+
# results_log = []
|
| 99 |
+
# answers_payload = []
|
| 100 |
+
|
| 101 |
+
# try:
|
| 102 |
+
# submitted_answer = agent(question_text)
|
| 103 |
+
# answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
| 104 |
+
# results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
| 105 |
+
# except Exception as e:
|
| 106 |
+
# print(f"Error running agent on task {task_id}: {e}")
|
| 107 |
+
# results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": f"AGENT ERROR: {e}"})
|
| 108 |
+
|
| 109 |
+
# if not answers_payload:
|
| 110 |
+
# print("Agent did not produce any answers to submit.")
|
| 111 |
+
# return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
|
| 112 |
|
| 113 |
#run_and_submit_one()
|
| 114 |
|