Jofthomas commited on
Commit
2f92831
·
1 Parent(s): 4a0d2aa

token usage from admin

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -762,7 +762,8 @@ with gr.Blocks(css=APP_CSS, title="LLM GeoGuessr") as demo:
762
  try:
763
  profile = whoami(token=token.token)
764
  username = profile["name"]
765
- todays_games = data_manager.get_todays_games(token=token.token)
 
766
  # Only check if user played today if BLOCK_MULTIPLE_GAMES is enabled
767
  has_played = data_manager.BLOCK_MULTIPLE_GAMES and data_manager.has_user_played_today(username, todays_games)
768
  except Exception as e:
 
762
  try:
763
  profile = whoami(token=token.token)
764
  username = profile["name"]
765
+ # Use server token to read the dataset, not user's token
766
+ todays_games = data_manager.get_todays_games(token=SERVER_HF_TOKEN)
767
  # Only check if user played today if BLOCK_MULTIPLE_GAMES is enabled
768
  has_played = data_manager.BLOCK_MULTIPLE_GAMES and data_manager.has_user_played_today(username, todays_games)
769
  except Exception as e: