tomerz-aai commited on
Commit
903a562
·
1 Parent(s): 4dcf40f
Files changed (1) hide show
  1. app.py +7 -6
app.py CHANGED
@@ -315,13 +315,14 @@ with blocks:
315
  logout_box = gr.Group(visible=False)
316
  with logout_box:
317
  gr.Markdown("Your session has EXPIRED. Please sign in again")
 
318
  # gr.Button("Manual Logout", link="/logout")
319
- #gr.HTML(JS_LOGOUT)
320
  # Manual logout link to server-side /logout
321
- gr.HTML('<a href="/logout?redirect=/" style="display: inline-block; padding: 10px; background: #ff4d4f; color: white; text-decoration: none; border-radius: 5px;">Logout (via /logout)</a>')
322
-
323
- # Custom clear cookies link
324
- gr.HTML('<a href="/clear-cookies" style="display: inline-block; padding: 10px; background: #ff6666; color: white; text-decoration: none; border-radius: 5px; margin-left: 10px;">Clear Cookies</a>')
325
 
326
 
327
  # Shown when logged IN
@@ -376,7 +377,7 @@ with blocks:
376
  # blocks.load(gate_submission, inputs=None, outputs=[login_box, submit_panel])
377
  blocks.load(gate_submission, inputs=None, outputs=[login_box, logout_box, submit_panel])
378
 
379
- blocks.app.add_api_route("/clear-cookies", clear_cookies, methods=["GET"])
380
 
381
 
382
  logger.info("Scheduler")
 
315
  logout_box = gr.Group(visible=False)
316
  with logout_box:
317
  gr.Markdown("Your session has EXPIRED. Please sign in again")
318
+ gr.LoginButton()
319
  # gr.Button("Manual Logout", link="/logout")
320
+ # gr.HTML(JS_LOGOUT)
321
  # Manual logout link to server-side /logout
322
+ # gr.HTML('<a href="/logout?redirect=/" style="display: inline-block; padding: 10px; background: #ff4d4f; color: white; text-decoration: none; border-radius: 5px;">Logout (via /logout)</a>')
323
+
324
+ # Custom clear cookies link
325
+ # gr.HTML('<a href="/clear-cookies" style="display: inline-block; padding: 10px; background: #ff6666; color: white; text-decoration: none; border-radius: 5px; margin-left: 10px;">Clear Cookies</a>')
326
 
327
 
328
  # Shown when logged IN
 
377
  # blocks.load(gate_submission, inputs=None, outputs=[login_box, submit_panel])
378
  blocks.load(gate_submission, inputs=None, outputs=[login_box, logout_box, submit_panel])
379
 
380
+ # blocks.app.add_api_route("/clear-cookies", clear_cookies, methods=["GET"])
381
 
382
 
383
  logger.info("Scheduler")