Spaces:
Sleeping
Sleeping
| import streamlit as st | |
| from PIL import Image | |
| def hide_menu_button(): | |
| st.markdown(""" <style> | |
| #MainMenu {visibility: hidden;} | |
| footer {visibility: hidden;} | |
| </style> """, unsafe_allow_html=True | |
| ) | |
| def condense_layout(): | |
| padding = 0 | |
| st.markdown(f""" <style> | |
| .reportview-container .main .block-container{{ | |
| padding-top: {padding}rem; | |
| padding-right: {padding}rem; | |
| padding-left: {padding}rem; | |
| padding-bottom: {padding}rem; | |
| }} </style> """, unsafe_allow_html=True | |
| ) | |
| def set_page_config(page:str='home', logo_size:str=200, pagetile:str=None): | |
| img = Image.open("/home/user/app/LogoVPI.png") | |
| st.set_page_config(# Alternate names: setup_page, page, layout | |
| layout="wide", # Can be "centered" or "wide". In the future also "dashboard", etc. | |
| initial_sidebar_state="auto", # Can be "auto", "expanded", "collapsed" | |
| page_title="VPI-MLogs", # String or None. Strings get appended with "• Streamlit". | |
| page_icon=img, # String, anything supported by st.image, or None. | |
| ) | |
| if page == 'home': | |
| col_1, col_2, col_3, col_4, col_5, = st.columns(5) | |
| with col_3: | |
| st.image("https://i.ibb.co/Yd42K98/LogoVPI.png", width=logo_size) | |
| elif page == 'sub': | |
| logo, info = st.columns([3, 7]) | |
| with logo: | |
| st.image("https://i.ibb.co/Yd42K98/LogoVPI.png", width=logo_size) | |
| with info: | |
| st.markdown(pagetile, unsafe_allow_html=True) | |