Spaces:
Paused
Paused
Commit
·
7405926
1
Parent(s):
0978691
Update app.py
Browse files
app.py
CHANGED
|
@@ -481,11 +481,9 @@ def run_captioning(*inputs):
|
|
| 481 |
|
| 482 |
def check_token(OAuthToken: gr.OAuthToken | None):
|
| 483 |
token = OAuthToken.token
|
| 484 |
-
print(OAuthToken.scope)
|
| 485 |
try:
|
| 486 |
api = HfApi(token=token)
|
| 487 |
user_data = api.whoami()
|
| 488 |
-
print(user_data)
|
| 489 |
print("CanPay", user_data['canPay'])
|
| 490 |
except Exception as e:
|
| 491 |
gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
|
|
|
|
| 481 |
|
| 482 |
def check_token(OAuthToken: gr.OAuthToken | None):
|
| 483 |
token = OAuthToken.token
|
|
|
|
| 484 |
try:
|
| 485 |
api = HfApi(token=token)
|
| 486 |
user_data = api.whoami()
|
|
|
|
| 487 |
print("CanPay", user_data['canPay'])
|
| 488 |
except Exception as e:
|
| 489 |
gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
|