tomerz-aai commited on
Commit
93e229f
·
1 Parent(s): b3ac6f8
Files changed (1) hide show
  1. app.py +3 -1
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
- if profile is None:
 
 
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