Update app.py
Browse files
app.py
CHANGED
@@ -39,11 +39,12 @@ class BasicAgent:
|
|
39 |
],
|
40 |
name="agent",
|
41 |
description="agent desc",
|
42 |
-
|
43 |
verbosity_level=2,
|
44 |
-
|
45 |
)
|
46 |
-
print("BasicAgent initialized.")
|
|
|
47 |
|
48 |
def __call__(self, question: str) -> str:
|
49 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
@@ -73,8 +74,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
73 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
74 |
try:
|
75 |
agent = BasicAgent()
|
76 |
-
|
77 |
-
agent.visualize()
|
78 |
|
79 |
except Exception as e:
|
80 |
print(f"Error instantiating agent: {e}")
|
@@ -116,6 +116,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
116 |
continue
|
117 |
try:
|
118 |
submitted_answer = agent(question_text)
|
|
|
|
|
119 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
120 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
121 |
except Exception as e:
|
|
|
39 |
],
|
40 |
name="agent",
|
41 |
description="agent desc",
|
42 |
+
planning_interval=5,
|
43 |
verbosity_level=2,
|
44 |
+
max_steps=15,
|
45 |
)
|
46 |
+
print("BasicAgent initialized.")
|
47 |
+
|
48 |
|
49 |
def __call__(self, question: str) -> str:
|
50 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
|
|
74 |
# 1. Instantiate Agent ( modify this part to create your agent)
|
75 |
try:
|
76 |
agent = BasicAgent()
|
77 |
+
|
|
|
78 |
|
79 |
except Exception as e:
|
80 |
print(f"Error instantiating agent: {e}")
|
|
|
116 |
continue
|
117 |
try:
|
118 |
submitted_answer = agent(question_text)
|
119 |
+
#--SM
|
120 |
+
agent.visualize()
|
121 |
answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
|
122 |
results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
|
123 |
except Exception as e:
|