simonevanbruggen commited on
Commit
f97941d
·
verified ·
1 Parent(s): 7dc696e

Update streamlit_app.py

Browse files
Files changed (1) hide show
  1. streamlit_app.py +7 -1
streamlit_app.py CHANGED
@@ -23,9 +23,15 @@ def check_password():
23
  st.session_state.authenticated = False
24
 
25
  if not st.session_state.authenticated:
 
26
  password = st.text_input("Enter password", type="password")
27
  if st.button("Login"):
28
- if password == st.secrets["APP_PASSWORD"]:
 
 
 
 
 
29
  st.session_state.authenticated = True
30
  st.rerun()
31
  else:
 
23
  st.session_state.authenticated = False
24
 
25
  if not st.session_state.authenticated:
26
+ st.markdown("## 🔒 Login required")
27
  password = st.text_input("Enter password", type="password")
28
  if st.button("Login"):
29
+ try:
30
+ correct = st.secrets["APP_PASSWORD"]
31
+ except Exception:
32
+ st.error("APP_PASSWORD not set in secrets!")
33
+ st.stop()
34
+ if password == correct:
35
  st.session_state.authenticated = True
36
  st.rerun()
37
  else: