at1300 commited on
Commit
37420d2
·
verified ·
1 Parent(s): aa9b568

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -65,10 +65,6 @@ class MasterAgent:
65
  print(f"Error instantiating agent: {e}")
66
  return f"Error initializing agent: {e}", None
67
 
68
- # Seems like this format was updated, we'll use the new default for now.
69
- #with open("prompts.yaml", 'r') as stream:
70
- # prompt_templates = yaml.safe_load(stream)
71
-
72
  print("Starting instantiation of master")
73
  self.master_agent = CodeAgent(
74
  tools=[
@@ -80,7 +76,6 @@ class MasterAgent:
80
  add_base_tools=True,
81
  planning_interval=5,
82
  max_steps=15,
83
- #prompt_templates=prompt_templates,
84
  managed_agents=[coder.agent],
85
  additional_authorized_imports=[
86
  "geopandas",
@@ -223,8 +218,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
223
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
224
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
225
 
226
- with open(task_answer_path, 'w'):
227
- yaml.dump({"task_id": task_id, "question_text": question_text, "submitted_answer": submitted_answer})
228
 
229
  except Exception as e:
230
  print(f"Error running agent on task {task_id}: {e}")
 
65
  print(f"Error instantiating agent: {e}")
66
  return f"Error initializing agent: {e}", None
67
 
 
 
 
 
68
  print("Starting instantiation of master")
69
  self.master_agent = CodeAgent(
70
  tools=[
 
76
  add_base_tools=True,
77
  planning_interval=5,
78
  max_steps=15,
 
79
  managed_agents=[coder.agent],
80
  additional_authorized_imports=[
81
  "geopandas",
 
218
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
219
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
220
 
221
+ with open(task_answer_path, 'w') as file:
222
+ yaml.dump({"task_id": task_id, "question_text": question_text, "submitted_answer": submitted_answer}, file)
223
 
224
  except Exception as e:
225
  print(f"Error running agent on task {task_id}: {e}")