Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -41,15 +41,15 @@ authenticator = stauth.Authenticate(
|
|
41 |
config['cookie']['expiry_days']
|
42 |
)
|
43 |
|
44 |
-
# Use
|
45 |
-
name, authentication_status, username = authenticator.login('Login')
|
46 |
|
47 |
-
if
|
48 |
st.error('Authentication failed. Please refresh and try again.')
|
49 |
st.stop()
|
50 |
|
51 |
st.sidebar.write(f"Welcome *{name}*")
|
52 |
-
authenticator.logout('Logout')
|
53 |
|
54 |
# ------------------------------
|
55 |
# Load Models
|
|
|
41 |
config['cookie']['expiry_days']
|
42 |
)
|
43 |
|
44 |
+
# Use positional arguments with a valid location parameter
|
45 |
+
name, authentication_status, username = authenticator.login('Login', 'main')
|
46 |
|
47 |
+
if authentication_status is None or authentication_status is False:
|
48 |
st.error('Authentication failed. Please refresh and try again.')
|
49 |
st.stop()
|
50 |
|
51 |
st.sidebar.write(f"Welcome *{name}*")
|
52 |
+
authenticator.logout('Logout', 'sidebar')
|
53 |
|
54 |
# ------------------------------
|
55 |
# Load Models
|