eagle0504 commited on
Commit
088c41c
·
verified ·
1 Parent(s): 5d98d9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -48,10 +48,12 @@ with st.sidebar:
48
  )
49
 
50
  with st.expander("Login 🔒", expanded=True):
51
- authenticator.login("Login", "main")
 
52
 
53
  if st.session_state["authentication_status"]:
54
- authenticator.logout("Logout", "main", key="unique_key_login")
 
55
  st.write(f'Welcome *{st.session_state["name"]}*')
56
  st.title(
57
  "You logged in! You can choose a session in the bottom of the sidebar and view content."
@@ -149,13 +151,15 @@ if st.session_state["authentication_status"]:
149
 
150
  with st.sidebar:
151
  with st.expander("Login 🔒", expanded=True):
152
- authenticator.login("Login", "main")
 
153
  st.warning(
154
  "If you are running this app on HuggingFace, you'll need to just refresh your screen to log out."
155
  )
156
  if st.session_state["authentication_status"]:
157
  try:
158
- authenticator.logout("Logout", "main", key="unique_key")
 
159
  except KeyError:
160
  pass # ignore it
161
  except Exception as err:
 
48
  )
49
 
50
  with st.expander("Login 🔒", expanded=True):
51
+ # authenticator.login("Login", "main")
52
+ authenticator.login()
53
 
54
  if st.session_state["authentication_status"]:
55
+ # authenticator.logout("Logout", "main", key="unique_key_login")
56
+ authenticator.logout()
57
  st.write(f'Welcome *{st.session_state["name"]}*')
58
  st.title(
59
  "You logged in! You can choose a session in the bottom of the sidebar and view content."
 
151
 
152
  with st.sidebar:
153
  with st.expander("Login 🔒", expanded=True):
154
+ # authenticator.login("Login", "main")
155
+ authenticator.login()
156
  st.warning(
157
  "If you are running this app on HuggingFace, you'll need to just refresh your screen to log out."
158
  )
159
  if st.session_state["authentication_status"]:
160
  try:
161
+ # authenticator.logout("Logout", "main", key="unique_key")
162
+ authenticator.logout()
163
  except KeyError:
164
  pass # ignore it
165
  except Exception as err: