awacke1 commited on
Commit
cf3e246
·
verified ·
1 Parent(s): d67b9b4

Update backup1-app.py

Browse files
Files changed (1) hide show
  1. backup1-app.py +2 -2
backup1-app.py CHANGED
@@ -31,7 +31,7 @@ def authenticate_user():
31
  if st.sidebar.button("Logout"):
32
  st.session_state.hf_token = None
33
  st.session_state.is_authenticated = False
34
- st.experimental_rerun()
35
  else:
36
  token = st.sidebar.text_input("Enter HuggingFace Token", type="password",
37
  help="Get your token from https://huggingface.co/settings/tokens")
@@ -43,7 +43,7 @@ def authenticate_user():
43
  api.whoami()
44
  save_token(token)
45
  st.sidebar.success("Successfully logged in!")
46
- st.experimental_rerun()
47
  except Exception as e:
48
  st.sidebar.error(f"Authentication failed: {str(e)}")
49
  else:
 
31
  if st.sidebar.button("Logout"):
32
  st.session_state.hf_token = None
33
  st.session_state.is_authenticated = False
34
+ st.rerun()
35
  else:
36
  token = st.sidebar.text_input("Enter HuggingFace Token", type="password",
37
  help="Get your token from https://huggingface.co/settings/tokens")
 
43
  api.whoami()
44
  save_token(token)
45
  st.sidebar.success("Successfully logged in!")
46
+ st.rerun()
47
  except Exception as e:
48
  st.sidebar.error(f"Authentication failed: {str(e)}")
49
  else: