ThomasSimonini HF staff commited on
Commit
5ee993d
·
1 Parent(s): 4ab2c19

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -333,8 +333,8 @@ def add_certified_user(hf_username, first_name, last_name, pass_percentage):
333
  print("ADD CERTIFIED USER")
334
  repo.git_pull()
335
  history = pd.read_csv(os.path.join(CERTIFIED_USERS_DIR, CERTIFIED_USERS_FILENAME))
336
- query = 'hf_username == ' + hf_username
337
- check = history.query(query)
338
  print("CHECK", check)
339
  print("INDEX", check.index)
340
  new_row = pd.DataFrame({'hf_username': hf_username, 'first_name': first_name, 'last_name': last_name, 'pass_percentage': pass_percentage, 'datetime': time.time()}, index=[0])
 
333
  print("ADD CERTIFIED USER")
334
  repo.git_pull()
335
  history = pd.read_csv(os.path.join(CERTIFIED_USERS_DIR, CERTIFIED_USERS_FILENAME))
336
+
337
+ check = df.loc[df['hf_username'] == hf_username]
338
  print("CHECK", check)
339
  print("INDEX", check.index)
340
  new_row = pd.DataFrame({'hf_username': hf_username, 'first_name': first_name, 'last_name': last_name, 'pass_percentage': pass_percentage, 'datetime': time.time()}, index=[0])