Spaces:
Sleeping
Sleeping
Test
Browse files
app.py
CHANGED
|
@@ -87,15 +87,18 @@ def submit_eval_run(profile: gr.OAuthProfile | None):
|
|
| 87 |
}
|
| 88 |
|
| 89 |
try:
|
| 90 |
-
|
| 91 |
-
response.raise_for_status()
|
| 92 |
-
result = response.json()
|
| 93 |
-
summary = (
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
)
|
|
|
|
|
|
|
|
|
|
| 99 |
return summary, pd.DataFrame(results_log)
|
| 100 |
except Exception as e:
|
| 101 |
return f"Submission failed: {e}", pd.DataFrame(results_log)
|
|
|
|
| 87 |
}
|
| 88 |
|
| 89 |
try:
|
| 90 |
+
#esponse = requests.post(f"{DEFAULT_API_URL}/submit", json=submission_data, timeout=60)
|
| 91 |
+
#response.raise_for_status()
|
| 92 |
+
#result = response.json()
|
| 93 |
+
#summary = (
|
| 94 |
+
# f"Submission Successful!\n"
|
| 95 |
+
# f"User: {result.get('username')}\n"
|
| 96 |
+
# f"Score: {result.get('score')}% ({result.get('correct_count')}/{result.get('total_attempted')})\n"
|
| 97 |
+
# f"Message: {result.get('message', 'No message received.')}"
|
| 98 |
+
#)
|
| 99 |
+
#return summary, pd.DataFrame(results_log)
|
| 100 |
+
# TEST MODE: Skip submission
|
| 101 |
+
summary = f"🧪 TEST MODE: Completed {len(answers_payload)} questions. No results submitted."
|
| 102 |
return summary, pd.DataFrame(results_log)
|
| 103 |
except Exception as e:
|
| 104 |
return f"Submission failed: {e}", pd.DataFrame(results_log)
|