Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -550,14 +550,7 @@ def create_mock_questions():
|
|
550 |
'''
|
551 |
|
552 |
|
553 |
-
return
|
554 |
-
{
|
555 |
-
"task_id":"7bd855d8-463d-4ed5-93ca-5fe35145f733",
|
556 |
-
"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.",
|
557 |
-
"Level":"1",
|
558 |
-
"file_name":"7bd855d8-463d-4ed5-93ca-5fe35145f733.xlsx"
|
559 |
-
}
|
560 |
-
]
|
561 |
|
562 |
def process_questions(serviceList):
|
563 |
# 1. Rimuovi dalla serviceList tutte le domande i cui task_id sono in blackList
|
@@ -734,7 +727,8 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
734 |
if DOMANDE_MOCKATE:
|
735 |
total_questions = create_mock_questions()
|
736 |
else:
|
737 |
-
|
|
|
738 |
response.raise_for_status()
|
739 |
total_questions = response.json()
|
740 |
|
|
|
550 |
'''
|
551 |
|
552 |
|
553 |
+
return whiteList
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
554 |
|
555 |
def process_questions(serviceList):
|
556 |
# 1. Rimuovi dalla serviceList tutte le domande i cui task_id sono in blackList
|
|
|
727 |
if DOMANDE_MOCKATE:
|
728 |
total_questions = create_mock_questions()
|
729 |
else:
|
730 |
+
responseFromService = requests.get(questions_url, timeout=15)
|
731 |
+
response = process_questions(responseFromService)
|
732 |
response.raise_for_status()
|
733 |
total_questions = response.json()
|
734 |
|