-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
45 lines (34 loc) · 1.15 KB
/
app.py
File metadata and controls
45 lines (34 loc) · 1.15 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
44
45
from __future__ import annotations
import importlib
from io import BytesIO
import streamlit as st
from PIL import Image
from dotenv import load_dotenv
from assets import image_data
from style.styles import apply_styles
from components.header import render_header
from pages import home, sequencing, database, contact_us
load_dotenv()
home = importlib.reload(home)
sequencing = importlib.reload(sequencing)
database = importlib.reload(database)
contact_us = importlib.reload(contact_us)
FAVICON_IMAGE = Image.open(BytesIO(image_data.favicon_png_bytes()))
st.set_page_config(
page_title="Sormanni Sequencing", page_icon=FAVICON_IMAGE, layout="wide"
)
if "active_page" not in st.session_state:
st.session_state.active_page = "Home"
query_params = st.query_params
if "page" in query_params:
st.session_state.active_page = query_params["page"]
apply_styles()
render_header()
if st.session_state.active_page == "Home":
home.render()
elif st.session_state.active_page == "Sequencing":
sequencing.render()
elif st.session_state.active_page == "Database":
database.render()
elif st.session_state.active_page == "Contact Us":
contact_us.render()