Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| import lib.ui.statusMessage as sm | |
| import lib.ui.sidebar as sb | |
| import lib.ui.main as main | |
| if 'sv_flask_server_proc' not in st.session_state: | |
| st.session_state.sv_flask_server_proc = None | |
| if 'sv_mapping_file_name' not in st.session_state: | |
| st.session_state.sv_mapping_file_name = None | |
| # Starting Streamlit | |
| def fn_start_streamlit(): | |
| # -- Streamlit Settings | |
| st.set_page_config( | |
| page_title="Personal AI Assistant - Chatbot", | |
| page_icon="🧊", | |
| # layout="wide", | |
| initial_sidebar_state="collapsed" | |
| ) | |
| st.markdown(""" | |
| <style> | |
| .block-container:not(.stSidebarUserContent) { | |
| padding-top: 2rem; | |
| padding-left: 0rem; | |
| padding-right: 0rem; | |
| } | |
| </style> | |
| """, unsafe_allow_html=True) | |
| st.markdown(""" | |
| <style> | |
| .reportview-container { | |
| margin-top: -2em; | |
| } | |
| #MainMenu {visibility: hidden;} | |
| .stDeployButton {display:none;} | |
| footer {visibility: hidden;} | |
| #stDecoration {display:none;} | |
| </style> | |
| """, unsafe_allow_html=True | |
| ) | |
| # -- Display Processing Details | |
| ui_status_message = st.empty() | |
| # -- Display SideBar | |
| with st.sidebar: | |
| sb.fn_sidebar_configuration(ui_status_message,sm) | |
| # -- Display Main Content | |
| main.fn_main_configuration(ui_status_message,sm) | |
| # Loading Main | |
| if __name__ == "__main__": | |
| fn_start_streamlit() |