cowrycode commited on
Commit
17b047a
·
verified ·
1 Parent(s): 43b0388

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -124,7 +124,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
124
 
125
  #3A
126
 
127
- def run_all_questions(questions_data):
128
  answers_payload = []
129
  for item in questions_data:
130
  task_id = item.get("task_id")
@@ -133,7 +133,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
133
  print(f"Skipping item with missing task_id or question: {item}")
134
  continue
135
  try:
136
- answer = agent.run(question_text) # await coroutine
137
  answers_payload.append({"task_id": task_id, "submitted_answer": answer})
138
  print(f"Answered Task {task_id}: {answer[:50]}...")
139
  except Exception as e:
 
124
 
125
  #3A
126
 
127
+ async def run_all_questions(questions_data):
128
  answers_payload = []
129
  for item in questions_data:
130
  task_id = item.get("task_id")
 
133
  print(f"Skipping item with missing task_id or question: {item}")
134
  continue
135
  try:
136
+ answer = wait agent.run(question_text) # await coroutine
137
  answers_payload.append({"task_id": task_id, "submitted_answer": answer})
138
  print(f"Answered Task {task_id}: {answer[:50]}...")
139
  except Exception as e: