minhthong commited on
Commit
ae9def9
1 Parent(s): dc00ed6

Upload 2 files

Browse files
Files changed (2) hide show
  1. app.py +36 -0
  2. requirements.txt +10 -0
app.py ADDED
@@ -0,0 +1,36 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import streamlit_antd_components as sac
3
+
4
+ # CSS để ẩn sidebar mặc định
5
+ no_sidebar_style = """
6
+ <style>
7
+ div[data-testid="stSidebarNav"] {display: none;}
8
+ </style>
9
+ """
10
+ st.markdown(no_sidebar_style, unsafe_allow_html=True)
11
+
12
+ # Tạo menu trong sidebar
13
+ with st.sidebar:
14
+ menu_item = sac.menu([
15
+ sac.MenuItem('Home', icon='house-fill'),
16
+ sac.MenuItem('Products', icon='box-fill', children=[
17
+ sac.MenuItem('Apple', icon='apple'),
18
+ sac.MenuItem('Google', icon='google'),
19
+ ]),
20
+ ], open_all=True)
21
+
22
+ # Link to the respective pages using exec
23
+ if menu_item == 'Home':
24
+ st.write("Home Page")
25
+ exec(open('pages/home.py').read())
26
+ elif menu_item == 'Apple':
27
+ st.write("Apple Page")
28
+ exec(open('pages/apple.py').read(), globals())
29
+ elif menu_item == 'Google':
30
+ st.write("Google Page")
31
+ exec(open('pages/google.py').read(), globals())
32
+ elif menu_item == 'Products':
33
+ st.write("Products Page")
34
+ exec(open('pages/products.py').read(), globals())
35
+
36
+
requirements.txt ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ streamlit
2
+ pandas
3
+ gspread
4
+ oauth2client
5
+ streamlit-autorefresh
6
+ streamlit-option-menu
7
+ streamlit_navigation_bar
8
+ streamlit-on-Hover-tabs
9
+ streamlit_antd_components
10
+ toml