Spaces:
Runtime error
Runtime error
Commit
·
468feab
1
Parent(s):
709d65d
Update app.py
Browse files
app.py
CHANGED
@@ -472,9 +472,11 @@ def run_captioning(*inputs):
|
|
472 |
|
473 |
def check_token(OAuthToken: gr.OAuthToken | None):
|
474 |
token = OAuthToken.token
|
|
|
475 |
try:
|
476 |
api = HfApi(token=token)
|
477 |
user_data = api.whoami()
|
|
|
478 |
except Exception as e:
|
479 |
gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
|
480 |
return gr.update(visible=False), gr.update(visible=False)
|
|
|
472 |
|
473 |
def check_token(OAuthToken: gr.OAuthToken | None):
|
474 |
token = OAuthToken.token
|
475 |
+
print(OAuthToken)
|
476 |
try:
|
477 |
api = HfApi(token=token)
|
478 |
user_data = api.whoami()
|
479 |
+
print(user_data)
|
480 |
except Exception as e:
|
481 |
gr.Warning("Invalid user token. Make sure to get your Hugging Face token from the settings page")
|
482 |
return gr.update(visible=False), gr.update(visible=False)
|