Not sure if this is user error but after I log in with correct login details, the rest of the app loads below the login box but the box stays there.
import streamlit as st
import pandas as pd
import numpy as np
import psycopg2
import plotly.express as px
import plotly.graph_objects as go
from plotly.subplots import make_subplots
from datetime import datetime, timedelta
import streamlit_authenticator as stauth
import yaml
from yaml.loader import SafeLoader
with open('config.yaml') as file:
config = yaml.load(file, Loader=SafeLoader)
authenticator = stauth.Authenticate(
config['credentials'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days']
)
try:
authenticator.login()
except Exception as e:
st.error(e)
if st.session_state.get('authentication_status'):
# Show Logout Button
authenticator.logout()
# Add custom CSS
st.markdown("""
<style>
.main-header {
font-size: 2.5rem;
font-weight: 700;
margin-bottom: 1rem;
}
.subheader {
font-size: 1.5rem;
font-weight: 500;
margin-bottom: 1rem;
}
.card {
padding: 1rem;
border-radius: 0.5rem;
background-color: #f5f5f5;
margin-bottom: 1rem;
}
</style>
""", unsafe_allow_html=True)
Not sure if this is user error but after I log in with correct login details, the rest of the app loads below the login box but the box stays there.
Code I am running:
Notes: