-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
43 lines (32 loc) · 1.24 KB
/
app.py
File metadata and controls
43 lines (32 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
import base64
import streamlit as st
st.set_page_config(page_title=" ShadowLog ", page_icon="assets/logo.png", layout="wide")
def add_logo():
# Lecture du fichier image local
with open("assets/small_logo_no_text.png", "rb") as f:
logo_data = base64.b64encode(f.read()).decode()
st.markdown(
f"""
<style>
[data-testid="stSidebarNav"] {{
background-image: url("data:image/png;base64,{logo_data}");
background-repeat: no-repeat;
padding-top: 225px;
background-position: center 20px;
background-size: 50%;
}}
</style>
""",
unsafe_allow_html=True,
)
add_logo()
# Pages definition
home = st.Page("sections/home.py", title="🏠 Home")
upload = st.Page("sections/upload.py", title="📥 Upload")
statistics = st.Page("sections/statistics.py", title="📈 Statistics")
analyze = st.Page("sections/analyze.py", title="🔍 Analyze")
analytics = st.Page("sections/analytics.py", title="🤖 Analytics")
alerts = st.Page("sections/alerts.py", title="🚨 Alerts")
about = st.Page("sections/about.py", title="📄 About")
pg = st.navigation([home, upload, statistics, analyze, analytics])
pg.run()