Michaeldavidstein commited on
Commit
47f5552
·
verified ·
1 Parent(s): 01c8010

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -766,8 +766,9 @@ def nutrition_disorder_streamlit():
766
 
767
  # Login form: Only if user is not logged in
768
  if st.session_state.user_id is None:
769
- with st.form("login_form", clear_on_submit=True):
770
- user_id = st.text_input("Please enter your name or id and press Login to begin:")
 
771
  submit_button = st.form_submit_button("Login")
772
  if submit_button and user_id:
773
  st.session_state.user_id = user_id
@@ -852,6 +853,3 @@ def nutrition_disorder_streamlit():
852
 
853
  if __name__ == "__main__":
854
  nutrition_disorder_streamlit()
855
-
856
- if __name__ == "__main__":
857
- nutrition_disorder_streamlit()
 
766
 
767
  # Login form: Only if user is not logged in
768
  if st.session_state.user_id is None:
769
+ # Use a unique key for the form
770
+ with st.form(key="login_form", clear_on_submit=True):
771
+ user_id = st.text_input("Please enter your name to begin:")
772
  submit_button = st.form_submit_button("Login")
773
  if submit_button and user_id:
774
  st.session_state.user_id = user_id
 
853
 
854
  if __name__ == "__main__":
855
  nutrition_disorder_streamlit()