Weyaxi commited on
Commit
0bae0f5
1 Parent(s): 44a3392

please work

Browse files
Files changed (1) hide show
  1. functions.py +3 -6
functions.py CHANGED
@@ -152,13 +152,10 @@ def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_toke
152
  finished_models = get_datas(data)
153
  df = pd.DataFrame(finished_models)
154
 
155
- if oauth_token is None:
156
- gr.Warning("You are not logged in; therefore, the leaderboard-pr-bot will open the pull request instead of you. Click on 'Sign in with Huggingface' to log in.")
157
- token = BOT_HF_TOKEN
158
- elif oauth_token.expires_at < time.time():
159
- raise gr.Error("Token expired. Logout and try again.")
160
  else:
161
- token = oauth_token.token
162
 
163
  if repo.startswith("https://huggingface.co/"):
164
  try:
 
152
  finished_models = get_datas(data)
153
  df = pd.DataFrame(finished_models)
154
 
155
+ if not oauth_token:
156
+ raise gr.Warning("You are not logged in. Click on 'Sign in with Huggingface' to log in.")
 
 
 
157
  else:
158
+ token = oauth_token
159
 
160
  if repo.startswith("https://huggingface.co/"):
161
  try: