forked from t0mdavid-m/TOPPView-Lite
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
21 lines (18 loc) · 702 Bytes
/
app.py
File metadata and controls
21 lines (18 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import streamlit as st
from pathlib import Path
import json
# For some reason the windows version only works if this is imported here
import pyopenms
if "settings" not in st.session_state:
with open("settings.json", "r") as f:
st.session_state.settings = json.load(f)
if __name__ == '__main__':
pages = {
str(st.session_state.settings["app-name"]): [
st.Page(Path("content", "welcome.py"), title="Welcome", icon="👋", default=True),
st.Page(Path("content", "upload.py"), title="Upload", icon="📂"),
st.Page(Path("content", "viewer.py"), title="Viewer", icon="👀"),
],
}
pg = st.navigation(pages)
pg.run()