Skip to content
Snippets Groups Projects
app.py 2.67 KiB
Newer Older
DIANE's avatar
DIANE committed
from common import *
DIANE's avatar
DIANE committed
st.set_page_config(page_title="NIRS Utils", page_icon=":goat:", layout="wide")
DIANE's avatar
UI  
DIANE committed
# layout
UiComponents(pagespath = pages_folder, csspath= css_file,imgpath=image_path ,
             header=True, sidebar= True, bgimg=True, colborders=False)
DIANE's avatar
DIANE committed

# Page affiliation
    st.subheader("Plateforme d'Analyses Chimiques pour l'Ecologie-PACE :goat:")
    st.markdown("""
        <h1 class="header1">Easily process <br> your spectral data<br> with <span class="green">NIRS Utils</span></h1>
        """, unsafe_allow_html=True)

DIANE's avatar
DIANE committed
# add graphical abstract
DIANE's avatar
DIANE committed
st.markdown(
    """
    <div style="height: 50px;"></div>
    """,
      unsafe_allow_html=True)
DIANE's avatar
DIANE committed
c1, c2 = st.columns([2, 2])
with c2:
    image = Image.open("images/general.JPG")
    new_image = image.resize((700, 400))
    c2.image(new_image)


# subpage info
DIANE's avatar
DIANE committed
st.markdown(
    """
    <div style="height: 50px;"></div>
    """,
      unsafe_allow_html=True)

DIANE's avatar
DIANE committed
c3, c4, c5 = st.columns([2, 1.5, 2])
with c3:    
DIANE's avatar
DIANE committed
    st.markdown('<h3 class="centered-text">About</h3>', unsafe_allow_html=True)
    st.markdown('<h4 class="centered-text"> NIRS Utils is a powerful tool that was developed to ease the spectral data processing process. It benifits from the synergy between web and data science frameworks to offer a user-friendly interface featured a variety of analytical capabilities. Further information can be found here.</h3>', unsafe_allow_html=True)
DIANE's avatar
DIANE committed
with c5:    
DIANE's avatar
DIANE committed
    st.markdown('<h3 class="centered-text">Key Features</h3>', unsafe_allow_html=True)
    st.markdown('<h4 class="centered-text"> Our app featured a variety of analytical capabilities that makes it the optimal solution for spectral data processing : <br> - Easy-to-use. <br> - Use advanced frameworks. <br> - Enhanced automation capabilities. <br> - Saves your time and efforts.</h4>', unsafe_allow_html=True)
DIANE's avatar
DIANE committed
# add buttons at the bottom of the page
DIANE's avatar
DIANE committed
match st.session_state.interface:
    case 'simple':
        _, header1, header2, header3 = st.columns([.2, .5, .5, .5])
        if header3.button("Models Creation & Predictions", type = 'primary'):
            st.switch_page(pages_folder / '2-model_creation.py')

    case 'advanced':
        _, header1, header2, header3, header4 = st.columns([.2, .5, .5, .5, .5])
        if header3.button("Models Creation", type = 'primary'):
            st.switch_page(pages_folder / '2-model_creation.py')
        if header4.button("Predictions", type = 'primary'):
            st.switch_page(pages_folder / '3-prediction.py')

if header1.button("Inputs", type = 'primary'):
DIANE's avatar
DIANE committed
    st.switch_page(pages_folder / '0-inputs.py')
DIANE's avatar
DIANE committed
if header2.button("Samples Selection", type = 'primary'):
    st.switch_page(pages_folder / '1-samples_selection.py')