-
Notifications
You must be signed in to change notification settings - Fork 2
/
app.py
41 lines (34 loc) · 1.13 KB
/
app.py
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
import hydralit_components as hc
import platform
if platform.system() != "Darwin":
import streamlit as st
# setup XVFB for streamlit cloud
from stpyvista.utils import start_xvfb
if "IS_XVFB_RUNNING" not in st.session_state:
start_xvfb()
st.session_state.IS_XVFB_RUNNING = True
from navigation.infer_page import application_page
from navigation.home_page import home_page
from navigation.moose_setup_page import moose_setup_page
HOME = 'Home'
APPLICATION = 'HIVE surrogate'
MOOSE_INFO = 'MOOSE configuration'
option_data = [
{'icon': "🏠", 'label': HOME},
{'icon': "🤖", 'label': APPLICATION},
{'icon': "🫎", 'label': MOOSE_INFO},
]
over_theme = {'txc_inactive': 'black', 'menu_background': '#F5B7B1', 'txc_active': 'white', 'option_active': '#CD5C5C'}
font_fmt = {'font-class': 'h3', 'font-size': '50%'}
chosen_tab = hc.option_bar(
option_definition=option_data,
title='',
key='PrimaryOptionx',
override_theme=over_theme,
horizontal_orientation=True)
if chosen_tab == HOME:
home_page()
elif chosen_tab == APPLICATION:
application_page()
elif chosen_tab == MOOSE_INFO:
moose_setup_page()