Spaces:
Sleeping
Sleeping
Fix data extraction
Browse files
app.py
CHANGED
@@ -69,11 +69,11 @@ class BasicAgent:
|
|
69 |
step_class = "UnknownStep"
|
70 |
|
71 |
step_dict = step.dict()
|
72 |
-
df_agent_steps.
|
73 |
-
df_agent_steps.
|
74 |
-
df_agent_steps.
|
75 |
for key, value in step_dict.items():
|
76 |
-
df_agent_steps.
|
77 |
|
78 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
79 |
return fixed_answer, df_agent_steps
|
@@ -191,7 +191,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None, mock_submission: bool =
|
|
191 |
answers_payload = []
|
192 |
df_agent_steps = pd.DataFrame(columns=columns)
|
193 |
print(f"Running agent on {len(questions_data)} questions...")
|
194 |
-
for item in questions_data:
|
195 |
task_id = item.get("task_id")
|
196 |
question_text = item.get("question")
|
197 |
file_path = get_full_file_path(task_id)
|
|
|
69 |
step_class = "UnknownStep"
|
70 |
|
71 |
step_dict = step.dict()
|
72 |
+
df_agent_steps.iloc[len(df_agent_steps)] = "None"
|
73 |
+
df_agent_steps.iloc[len(df_agent_steps), df_agent_steps.columns.get_loc('task_id')] = task_id
|
74 |
+
df_agent_steps.iloc[len(df_agent_steps), df_agent_steps.columns.get_loc('step_class')] = step_class
|
75 |
for key, value in step_dict.items():
|
76 |
+
df_agent_steps.iloc[len(df_agent_steps), df_agent_steps.columns.get_loc(key)] = value
|
77 |
|
78 |
print(f"Agent returning fixed answer: {fixed_answer}")
|
79 |
return fixed_answer, df_agent_steps
|
|
|
191 |
answers_payload = []
|
192 |
df_agent_steps = pd.DataFrame(columns=columns)
|
193 |
print(f"Running agent on {len(questions_data)} questions...")
|
194 |
+
for item in questions_data[:1]:
|
195 |
task_id = item.get("task_id")
|
196 |
question_text = item.get("question")
|
197 |
file_path = get_full_file_path(task_id)
|