Spaces:
Running
Running
some cleanup
Browse files
app.py
CHANGED
@@ -42,13 +42,13 @@ def hello(profile: gr.OAuthProfile | None, request: gr.Request) -> str:
|
|
42 |
user_id = query_params.get('user_id', [None])[0]
|
43 |
token = query_params.get('token', [None])[0]
|
44 |
|
45 |
-
print(f"token:{token}
|
46 |
|
47 |
if user_id is None or token is None:
|
48 |
-
return "# ❌ Invalid link. Generate a new
|
49 |
|
50 |
if int(user_id) not in user_tokens or user_tokens[int(user_id)] != token:
|
51 |
-
return "# ❌ Invalid or expired link. Generate a new
|
52 |
|
53 |
if profile is None:
|
54 |
return f"# ❌ Not logged in with Hugging Face yet."
|
|
|
42 |
user_id = query_params.get('user_id', [None])[0]
|
43 |
token = query_params.get('token', [None])[0]
|
44 |
|
45 |
+
print(f"||| token:{token}||| user_id:{user_id}||| profile:{profile}||| user_tokens:{user_tokens}")
|
46 |
|
47 |
if user_id is None or token is None:
|
48 |
+
return "# ❌ Invalid link. Generate a new link [here](https://discord.com/channels/879548962464493619/900125909984624713) !"
|
49 |
|
50 |
if int(user_id) not in user_tokens or user_tokens[int(user_id)] != token:
|
51 |
+
return "# ❌ Invalid or expired link. Generate a new link [here](https://discord.com/channels/879548962464493619/900125909984624713) !"
|
52 |
|
53 |
if profile is None:
|
54 |
return f"# ❌ Not logged in with Hugging Face yet."
|