Blanca commited on
Commit
6a05c32
·
verified ·
1 Parent(s): 8b41e97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
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-%dT%H:%M:%S.%fZ') < 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,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"Model {model} submitted by {organisation} successfully.\nPlease wait a few hours and refresh the leaderboard to see your score displayed.")
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():