-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.py
65 lines (53 loc) · 2.08 KB
/
main.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
import streamlit as st
from streamlit_option_menu import option_menu
from streamlit_lottie import st_lottie
from components import expert, gis, about
import json
# from components import business, land_prediction, strategy, estimation, methodology, about, crime, life_quality
# Apply theme from the config file
st.set_page_config(
page_title="I kontakt",
page_icon="📞",
layout="centered",
initial_sidebar_state="expanded"
)
class MultiApp:
def __init__(self):
self.apps = []
def add_app(self, title, func):
self.apps.append({
"title": title,
"function": func
})
def run(self):
# Create a sidebar option menu
with st.sidebar:
app = option_menu(
menu_title='📞 I kontakt',
options=['🗨️ Deskundige',
'🗺️ Kaart', '📖 Over de applicatie'],
icons=['house-garden','house-garden','house-garden'],
menu_icon='house-garden',
default_index=0, # Change the default index to 0 for "🏠 Прогноз стоимости"
styles={
"container": {"padding": "5!important", "width": "100%"}, # Adjust width here
# "icon": {"color": "white", "font-size": "0px"},
"nav-link": {"font-size": "20px", "text-align": "left", "margin":"0px", "--hover-color": "orange"},
"nav-link-selected": {"background-color": "#44484d"},
}
)
# Display selected app based on user choice
if app == "🗨️ Deskundige":
expert.app()
elif app == '🗺️ Kaart':
gis.app()
elif app == '📖 Over de applicatie':
about.app()
# Create an instance of MultiApp and add your apps
multi_app = MultiApp()
# Add your apps to the MultiApp instance
multi_app.add_app("🗨️ Deskundige", expert.app)
multi_app.add_app("🗺️ Kaart", gis.app)
multi_app.add_app("📖 Over de applicatie", about.app)
# Run the MultiApp
multi_app.run()