GattoNero commited on
Commit
abc97b2
·
verified ·
1 Parent(s): e1427b2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +48 -6
app.py CHANGED
@@ -548,7 +548,7 @@ blackList = [
548
  ]
549
 
550
 
551
- DOMANDE_MOCKATE = False
552
  def create_mock_questions():
553
 
554
  '''
@@ -564,16 +564,15 @@ def create_mock_questions():
564
  "question": "What is the first name of the only Malko Competition recipient from the 20th Century (after 1977) whose nationality on record is a country that no longer exists?",
565
  "Level": "1",
566
  "file_name": ""
567
- }
568
- '''
569
- return [
570
  {
571
  "task_id":"9d191bce-651d-4746-be2d-7ef8ecadb9c2",
572
  "question":"Examine the video at https://www.youtube.com/watch?v=1htKBjuUWec.\n\nWhat does Teal\\'c say in response to the question \"Isn\\'t that hot?\"",
573
  "Level":"1",
574
  "file_name":""
575
  }
576
- ]
 
577
 
578
 
579
  tempMock = [
@@ -597,6 +596,49 @@ tempMock = [
597
  {"task_id":"7bd855d8-463d-4ed5-93ca-5fe35145f733","question":"The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.","Level":"1","file_name":"7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx"}
598
  ]
599
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
600
 
601
 
602
  def process_questions(serviceList):
@@ -801,7 +843,7 @@ def run_and_submit_all(profile: gr.OAuthProfile | None):
801
  continue
802
  try:
803
  file_name = item.get("file_name")
804
- answer = "None"#agent(question, file_name)
805
  answers_payload.append({
806
  "task_id": task_id,
807
  "submitted_answer": answer,
 
548
  ]
549
 
550
 
551
+ DOMANDE_MOCKATE = True
552
  def create_mock_questions():
553
 
554
  '''
 
564
  "question": "What is the first name of the only Malko Competition recipient from the 20th Century (after 1977) whose nationality on record is a country that no longer exists?",
565
  "Level": "1",
566
  "file_name": ""
567
+ }
 
 
568
  {
569
  "task_id":"9d191bce-651d-4746-be2d-7ef8ecadb9c2",
570
  "question":"Examine the video at https://www.youtube.com/watch?v=1htKBjuUWec.\n\nWhat does Teal\\'c say in response to the question \"Isn\\'t that hot?\"",
571
  "Level":"1",
572
  "file_name":""
573
  }
574
+ '''
575
+ return testMock2
576
 
577
 
578
  tempMock = [
 
596
  {"task_id":"7bd855d8-463d-4ed5-93ca-5fe35145f733","question":"The attached Excel file contains the sales of menu items for a local fast-food chain. What were the total sales that the chain made from food (not including drinks)? Express your answer in USD with two decimal places.","Level":"1","file_name":"7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx"}
597
  ]
598
 
599
+ testMock2 = [
600
+ {
601
+ 'task_id': 'a0c07678-e491-4bbc-8f0b-07405144218f',
602
+ 'question': "Who are the pitchers with the number before and after Taishō Tamai's number as of July 2023? Give them to me in the form Pitcher Before, Pitcher After, use their last names only, in Roman characters.",
603
+ 'Level': '1',
604
+ 'file_name': ''
605
+ },
606
+ {
607
+ 'task_id': 'cf106601-ab4f-4af9-b045-5295fe67b37d',
608
+ 'question': "What country had the least number of athletes at the 1928 Summer Olympics? If there's a tie for a number of athletes, return the first in alphabetical order. Give the IOC country code as your answer.",
609
+ 'Level': '1',
610
+ 'file_name': ''
611
+ },
612
+ {
613
+ 'task_id': '840bfca7-4f7b-481a-8794-c560c340185d',
614
+ 'question': 'On June 6, 2023, an article by Carolyn Collins Petersen was published in Universe Today. This article mentions a team that produced a paper about their observations, linked at the bottom of the article. Find this paper. Under what NASA award number was the work performed by R. G. Arendt supported by?',
615
+ 'Level': '1',
616
+ 'file_name': ''
617
+ }, {
618
+ 'task_id': 'bda648d7-d618-4883-88f4-3466eabd860e',
619
+ 'question': "Where were the Vietnamese specimens described by Kuznetzov in Nedoshivina's 2010 paper eventually deposited? Just give me the city name without abbreviations.",
620
+ 'Level': '1',
621
+ 'file_name': ''
622
+ },
623
+ {
624
+ 'task_id': '3f57289b-8c60-48be-bd80-01f8099ca449',
625
+ 'question': 'How many at bats did the Yankee with the most walks in the 1977 regular season have that same season?',
626
+ 'Level': '1',
627
+ 'file_name': ''
628
+ },
629
+ {
630
+ 'task_id': 'cabe07ed-9eca-40ea-8ead-410ef5e83f91',
631
+ 'question': "What is the surname of the equine veterinarian mentioned in 1.E Exercises from the chemistry materials licensed by Marisa Alviar-Agnew & Henry Agnew under the CK-12 license in LibreText's Introductory Chemistry materials as compiled 08/21/2023?",
632
+ 'Level': '1',
633
+ 'file_name': ''
634
+ }, {
635
+ 'task_id': '3cef3a44-215e-4aed-8e3b-b1e3f08063b7',
636
+ 'question': "I'm making a grocery list for my mom, but she's a professor of botany and she's a real stickler when it comes to categorizing things. I need to add different foods to different categories on the grocery list, but if I make a mistake, she won't buy anything inserted in the wrong category. Here's the list I have so far:\n\nmilk, eggs, flour, whole bean coffee, Oreos, sweet potatoes, fresh basil, plums, green beans, rice, corn, bell pepper, whole allspice, acorns, broccoli, celery, zucchini, lettuce, peanuts\n\nI need to make headings for the fruits and vegetables. Could you please create a list of just the vegetables from my list? If you could do that, then I can figure out how to categorize the rest of the list into the appropriate categories. But remember that my mom is a real stickler, so make sure that no botanical fruits end up on the vegetable list, or she won't get them when she's at the store. Please alphabetize the list of vegetables, and place each item in a comma separated list.",
637
+ 'Level': '1',
638
+ 'file_name': ''
639
+ }
640
+ ]
641
+
642
 
643
 
644
  def process_questions(serviceList):
 
843
  continue
844
  try:
845
  file_name = item.get("file_name")
846
+ answer = agent(question, file_name)
847
  answers_payload.append({
848
  "task_id": task_id,
849
  "submitted_answer": answer,