Spaces:
Running
Running
Update ui.py
Browse files
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 |
-
|
185 |
-
|
186 |
if st.user.is_logged_in:
|
187 |
-
|
|
|
|
|
|
|
|
|
|
|
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 |
|