Newer
Older
from Packages import *
st.set_page_config(page_title="NIRS Utils", page_icon=":goat:", layout="wide",)
if 'interface' not in st.session_state:
st.session_state['interface'] = 'simple'
from Modules import *
from Class_Mod.DATA_HANDLING import *
# HTML pour le bandeau "CEFE - CNRS"
bandeau_html = """
<div style="width: 100%; background-color: #4682B4; padding: 10px; margin-bottom: 10px;">
<h1 style="text-align: center; color: white;">CEFE - CNRS</h1>
</div>
"""
# Injecter le code HTML du bandeau
st.markdown(bandeau_html, unsafe_allow_html=True)
# # TOC menu on the left
show_pages(
[Page("app.py", "Home"),
Page("pages\\1-samples_selection.py", "Samples Selection"),
Page("pages\\2-model_creation.py", "Models Creation & Predictions"),
# hide_pages("Samples Selection")
# hide_pages("Models Creation")
# hide_pages("Predictions")
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
with st.sidebar:
interface = st.selectbox(label="Interface", options=['simple', 'advanced'], key='interface')
st.page_link('pages\\1-samples_selection.py')
if st.session_state['interface'] == 'simple':
st.page_link('pages\\2-model_creation.py')
# if advanced interface, split Models Creation and Predictions
elif st.session_state['interface'] == 'advanced':
show_pages(
[Page("app.py", "Home"),
Page("pages\\1-samples_selection.py", "Samples Selection"),
Page("pages\\2-model_creation.py", "Models Creation"),
Page("pages\\3-prediction.py", "Predictions"),
]
)
st.page_link('pages\\2-model_creation.py')
st.page_link('pages\\3-prediction.py')
# Page header
with st.container():
# Centrer les boutons
st.markdown(
"""
<style>
.stButton>button {
display: block;
margin: 0 auto;
width: 200px;
height: 50px;
font-size: 16px;
}
</style>
""",
unsafe_allow_html=True
)
header1, header2, header3 = st.columns(3)
if header1.button("Samples Selection"):
st.switch_page('pages\\1-samples_selection.py')
if header2.button("Model Creation"):
st.switch_page('pages\\2-model_creation.py')
if header3.button("Predictions"):
st.switch_page('pages\\3-prediction.py')
st.subheader("Plateforme d'Analyses Chimiques pour l'Ecologie-PACE :goat:")
st.title("NIRS Utils")
st.write("Samples selection (PCA, [UMAP](https://umap-learn.readthedocs.io/en/latest/how_umap_works.html), ...), Predictive Modelling ([Pinard](https://github.com/GBeurier/pinard), [LWPLSR](https://doi.org/10.1002/cem.3209), ...), and Predictions using your data (CSV or DX files) and/or PACE NIRS Database.")
#st.image(img_general)
st.markdown("### We could add documentation here ###")