GattoNero commited on
Commit
f052698
·
verified ·
1 Parent(s): 75640a6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -20
app.py CHANGED
@@ -647,23 +647,6 @@ testMock2 = [
647
  ]
648
 
649
 
650
- def get_correct_answer(task_id: str) -> str | None:
651
- known_answers = {
652
- "99c9cc74-fdc8-46c6-8f8d-3ce2d3bfeea3": "cornstarch, freshly squeezed lemon juice, granulated sugar, ripe strawberries, vanilla extract",
653
- "f918266a-b3e0-4914-865d-4faa564f1aef": "0",
654
- "7bd855d8-463d-4ed5-93ca-5fe35145f733": "89706.00",
655
- "1f975693-876d-457b-a649-393859e79bf3": "132, 133, 134, 197, 245",
656
- "4fc2f1ae-8625-45b5-ab34-ad4433bc21f8": "FunkMonk",
657
- "2d83110e-a098-4ebb-9987-066c06fa42d0": "right",
658
- "cf106601-ab4f-4af9-b045-5295fe67b37d": "AFG",
659
- "3f57289b-8c60-48be-bd80-01f8099ca449": "498",
660
- "3cef3a44-215e-4aed-8e3b-b1e3f08063b7": "broccoli, celery, lettuce, sweet potatoes, whole allspice",
661
- "cabe07ed-9eca-40ea-8ead-410ef5e83f91": "Hathaway"
662
- }
663
- return known_answers.get(task_id)
664
-
665
-
666
-
667
  def process_questions(serviceList):
668
  # 1. Estrai tutti i task_id da escludere (da whiteList e blackList)
669
  exclude_ids = {q["task_id"] for q in whiteList + blackList}
@@ -869,9 +852,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
869
  continue
870
  try:
871
  file_name = item.get("file_name")
872
- answer = get_correct_answer(task_id)
873
- if answer is None:
874
- answer = agent(question, file_name)
875
  answers_payload.append({
876
  "task_id": task_id,
877
  "submitted_answer": answer,
 
647
  ]
648
 
649
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
650
  def process_questions(serviceList):
651
  # 1. Estrai tutti i task_id da escludere (da whiteList e blackList)
652
  exclude_ids = {q["task_id"] for q in whiteList + blackList}
 
852
  continue
853
  try:
854
  file_name = item.get("file_name")
855
+ answer = agent(question, file_name)
 
 
856
  answers_payload.append({
857
  "task_id": task_id,
858
  "submitted_answer": answer,