Spaces:
Runtime error
Runtime error
else token
Browse files
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 |
-
|
|
|
|
| 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:
|