Weyaxi commited on
Commit
115252e
1 Parent(s): c061bf0

else token

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -181,7 +181,8 @@ def commit(repo, pr_number=None, message="Adding Evaluation Results", oauth_toke
181
  token = BOT_HF_TOKEN
182
  elif oauth_token.expires_at < time.time():
183
  raise gr.Error("Token expired. Logout and try again.")
184
- token = token if token else oauth_token.token
 
185
 
186
  if repo.startswith("https://huggingface.co/"):
187
  try:
 
181
  token = BOT_HF_TOKEN
182
  elif oauth_token.expires_at < time.time():
183
  raise gr.Error("Token expired. Logout and try again.")
184
+ else:
185
+ token = token if token else oauth_token.token
186
 
187
  if repo.startswith("https://huggingface.co/"):
188
  try: