Junaidb commited on
Commit
06d0d70
·
verified ·
1 Parent(s): b8377b1

Update ui.py

Browse files
Files changed (1) hide show
  1. ui.py +16 -6
ui.py CHANGED
@@ -20,7 +20,7 @@ def InitSession():
20
  # st.session_state.loggedin=False
21
 
22
 
23
- InitSession()
24
 
25
 
26
 
@@ -180,11 +180,21 @@ def APP():
180
 
181
 
182
 
183
-
184
- if st.button("Log in"):
185
- st.login("auth0")
186
  if st.user.is_logged_in:
187
- st.logout()
 
 
 
 
 
188
  SHOWTABS()
189
-
 
 
 
 
 
190
 
 
20
  # st.session_state.loggedin=False
21
 
22
 
23
+ #InitSession()
24
 
25
 
26
 
 
180
 
181
 
182
 
183
+
184
+
185
+
186
  if st.user.is_logged_in:
187
+
188
+ if st.button("🚪 Logout"):
189
+ st.logout()
190
+ st.rerun()
191
+
192
+ #Then show the main UI
193
  SHOWTABS()
194
+ else:
195
+ #Show login when NOT logged in
196
+ st.info("Please log in to access the Bio Lab")
197
+ if st.button("Log in"):
198
+ st.login("auth0")
199
+ st.stop()
200