civerson916 commited on
Commit
1805dcf
·
verified ·
1 Parent(s): 60167ef

Update app.py

Browse files

remove dev scafold

Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -29,7 +29,7 @@ visit_webpage_tool = VisitWebpageTool()
29
  final_answer = FinalAnswerTool()
30
 
31
  model = LiteLLMModel(
32
- model_id="gemini/gemini-2.0-flash-lite",
33
  temperature=0.2,
34
  api_key=os.environ.get("GEMINI_KEY")
35
  )
@@ -303,13 +303,13 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
303
  # if item.get("task_id") == "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8"
304
 
305
  # chess image
306
- if item.get("task_id") == "cca530fc-4052-43b2-b130-b30968d8aa44":
307
 
308
  # python code
309
  # if item.get("task_id") == "f918266a-b3e0-4914-865d-4faa564f1aef":
310
- submitted_answer = agent(question_text)
311
- else:
312
- continue
313
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
314
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
315
  # Sleep to avoid the Gemini throttling at 15 RPM
@@ -322,7 +322,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
322
  print("Agent did not produce any answers to submit.")
323
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
324
 
325
- return "Questions parsed.", pd.DataFrame(results_log)
326
 
327
  # 4. Prepare Submission
328
  submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}
 
29
  final_answer = FinalAnswerTool()
30
 
31
  model = LiteLLMModel(
32
+ model_id="gemini/gemini-2.0-flash",
33
  temperature=0.2,
34
  api_key=os.environ.get("GEMINI_KEY")
35
  )
 
303
  # if item.get("task_id") == "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8"
304
 
305
  # chess image
306
+ # if item.get("task_id") == "cca530fc-4052-43b2-b130-b30968d8aa44":
307
 
308
  # python code
309
  # if item.get("task_id") == "f918266a-b3e0-4914-865d-4faa564f1aef":
310
+ # submitted_answer = agent(question_text)
311
+ # else:
312
+ # continue
313
  answers_payload.append({"task_id": task_id, "submitted_answer": submitted_answer})
314
  results_log.append({"Task ID": task_id, "Question": question_text, "Submitted Answer": submitted_answer})
315
  # Sleep to avoid the Gemini throttling at 15 RPM
 
322
  print("Agent did not produce any answers to submit.")
323
  return "Agent did not produce any answers to submit.", pd.DataFrame(results_log)
324
 
325
+ # return "Questions parsed.", pd.DataFrame(results_log)
326
 
327
  # 4. Prepare Submission
328
  submission_data = {"username": username.strip(), "agent_code": agent_code, "answers": answers_payload}