YingxuHe commited on
Commit
b72fad8
·
verified ·
1 Parent(s): eefb8e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +34 -26
app.py CHANGED
@@ -6,33 +6,41 @@ from st_on_hover_tabs import on_hover_tabs
6
 
7
  from pages import *
8
 
9
- ## Set Streamlit configuration
10
- st.set_page_config(page_title='MERaLiON-AudioLLM', page_icon = "🔥", layout='wide')
11
-
12
- st.markdown('<style>' + open('./style/sidebar_style.css').read() + '</style>', unsafe_allow_html=True)
13
-
14
- with st.sidebar:
15
- tabs = on_hover_tabs(tabName=['HOME',
16
- 'MERaLiON-AudioLLM',
17
- ],
18
- iconName=['dashboard', 'filter_1'],
19
- styles = {
20
- 'navtab': {
21
- 'font-size': '12px',
22
- 'transition': '0.3s',
23
- 'text-transform': 'none',
24
- },
25
- 'iconStyle':{
26
- 'font-size': '18px',
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  },
29
- },
30
- default_choice=0
31
- )
32
 
 
 
 
 
 
33
 
34
- if tabs =='HOME':
35
- home_page()
36
-
37
- elif tabs == 'MERaLiON-AudioLLM':
38
- audio_llm()
 
6
 
7
  from pages import *
8
 
9
+ certificate = os.getenv('PRIVATE_KEY')
10
+ dns_name = os.getenv('SERVER_DNS_NAME')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
 
12
+ def main():
13
+ ## Set Streamlit configuration
14
+ st.set_page_config(page_title='MERaLiON-AudioLLM', page_icon = "🔥", layout='wide')
15
+
16
+ st.markdown('<style>' + open('./style/sidebar_style.css').read() + '</style>', unsafe_allow_html=True)
17
+
18
+ with st.sidebar:
19
+ tabs = on_hover_tabs(tabName=['HOME',
20
+ 'MERaLiON-AudioLLM',
21
+ ],
22
+ iconName=['dashboard', 'filter_1'],
23
+ styles = {
24
+ 'navtab': {
25
+ 'font-size': '12px',
26
+ 'transition': '0.3s',
27
+ 'text-transform': 'none',
28
+ },
29
+ 'iconStyle':{
30
+ 'font-size': '18px',
31
+
32
+ },
33
  },
34
+ default_choice=0
35
+ )
36
+
37
 
38
+ if tabs =='HOME':
39
+ home_page()
40
+
41
+ elif tabs == 'MERaLiON-AudioLLM':
42
+ audio_llm()
43
 
44
+ if __name__ == '__main__':
45
+ start_server(certificate, dns_name)
46
+ main()