Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
·
93e229f
1
Parent(s):
b3ac6f8
wip
Browse files
app.py
CHANGED
@@ -160,7 +160,9 @@ def gate_submission(profile: gr.OAuthProfile | None):
|
|
160 |
"""
|
161 |
@brief Toggles the visibility of the login box and submission panel based on the user's login status.
|
162 |
"""
|
163 |
-
|
|
|
|
|
164 |
return gr.update(visible=True), gr.update(visible=False)
|
165 |
return gr.update(visible=False), gr.update(visible=True)
|
166 |
|
|
|
160 |
"""
|
161 |
@brief Toggles the visibility of the login box and submission panel based on the user's login status.
|
162 |
"""
|
163 |
+
ui = fetch_user_info(gr.OAuthToken.value)
|
164 |
+
logged_in = ui is not None
|
165 |
+
if not logged_in:
|
166 |
return gr.update(visible=True), gr.update(visible=False)
|
167 |
return gr.update(visible=False), gr.update(visible=True)
|
168 |
|