Spaces:
Running
Running
import yaml | |
from yaml.loader import SafeLoader | |
import streamlit_authenticator as stauth | |
# Load config from YAML | |
with open('config.yaml') as file: | |
config = yaml.load(file, Loader=SafeLoader) | |
# Define the authenticator | |
authenticator = stauth.Authenticate( | |
config['credentials'], # contains usernames/passwords | |
config['cookie']['name'], # name of the login session cookie | |
config['cookie']['key'], # secret key for signing the cookie | |
config['cookie']['expiry_days'], | |
# email whitelist | |
) |