Update app.py
Browse files
app.py
CHANGED
|
@@ -152,7 +152,7 @@ def add_new_eval(
|
|
| 152 |
# Was the profile created less than 2 month ago?
|
| 153 |
user_data = requests.get(f"https://huggingface.co/api/users/{profile.username}/overview")
|
| 154 |
creation_date = json.loads(user_data.content)["createdAt"]
|
| 155 |
-
if datetime.datetime.now() - datetime.datetime.strptime(creation_date, '%Y-%m-%
|
| 156 |
return format_error("This account is not authorized to submit on this leaderboard.")
|
| 157 |
|
| 158 |
# TODO: I should reactivate this check
|
|
@@ -334,7 +334,7 @@ def add_new_eval(
|
|
| 334 |
eval_results[val_or_test].push_to_hub(RESULTS_DATASET, config_name = YEAR_VERSION, token=TOKEN)
|
| 335 |
|
| 336 |
|
| 337 |
-
return format_log(f"
|
| 338 |
|
| 339 |
|
| 340 |
def refresh():
|
|
|
|
| 152 |
# Was the profile created less than 2 month ago?
|
| 153 |
user_data = requests.get(f"https://huggingface.co/api/users/{profile.username}/overview")
|
| 154 |
creation_date = json.loads(user_data.content)["createdAt"]
|
| 155 |
+
if datetime.datetime.now() - datetime.datetime.strptime(creation_date, '%Y-%m-%d') < datetime.timedelta(days=60):
|
| 156 |
return format_error("This account is not authorized to submit on this leaderboard.")
|
| 157 |
|
| 158 |
# TODO: I should reactivate this check
|
|
|
|
| 334 |
eval_results[val_or_test].push_to_hub(RESULTS_DATASET, config_name = YEAR_VERSION, token=TOKEN)
|
| 335 |
|
| 336 |
|
| 337 |
+
return format_log(f"Submission {model} submitted by {organisation} successfully.\nPlease refresh the leaderboard to see your score displayed.")
|
| 338 |
|
| 339 |
|
| 340 |
def refresh():
|