Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -222,6 +222,7 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
222 |
print("\n\n")
|
223 |
'''
|
224 |
total_questions = create_mock_questions()
|
|
|
225 |
questions_data = total_questions[:NUMERO_DOMANDE_TOTALE]
|
226 |
print(f"questions_data: {questions_data}")
|
227 |
if not questions_data:
|
@@ -269,6 +270,9 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
269 |
# 5. Submit
|
270 |
print(f"Submitting {len(answers_payload)} answers to: {submit_url}")
|
271 |
try:
|
|
|
|
|
|
|
272 |
response = requests.post(submit_url, json=submission_data, timeout=60)
|
273 |
response.raise_for_status()
|
274 |
result_data = response.json()
|
@@ -282,6 +286,10 @@ def run_and_submit_all( profile: gr.OAuthProfile | None):
|
|
282 |
print("Submission successful.")
|
283 |
results_df = pd.DataFrame(results_log)
|
284 |
return final_status, results_df
|
|
|
|
|
|
|
|
|
285 |
except requests.exceptions.HTTPError as e:
|
286 |
error_detail = f"Server responded with status {e.response.status_code}."
|
287 |
try:
|
|
|
222 |
print("\n\n")
|
223 |
'''
|
224 |
total_questions = create_mock_questions()
|
225 |
+
print(f"total_questions: {total_questions}")
|
226 |
questions_data = total_questions[:NUMERO_DOMANDE_TOTALE]
|
227 |
print(f"questions_data: {questions_data}")
|
228 |
if not questions_data:
|
|
|
270 |
# 5. Submit
|
271 |
print(f"Submitting {len(answers_payload)} answers to: {submit_url}")
|
272 |
try:
|
273 |
+
|
274 |
+
|
275 |
+
'''
|
276 |
response = requests.post(submit_url, json=submission_data, timeout=60)
|
277 |
response.raise_for_status()
|
278 |
result_data = response.json()
|
|
|
286 |
print("Submission successful.")
|
287 |
results_df = pd.DataFrame(results_log)
|
288 |
return final_status, results_df
|
289 |
+
'''
|
290 |
+
return "mock1", "mock2"
|
291 |
+
|
292 |
+
|
293 |
except requests.exceptions.HTTPError as e:
|
294 |
error_detail = f"Server responded with status {e.response.status_code}."
|
295 |
try:
|