Spaces:
Running
Running
James McCool
commited on
Commit
·
a03d7b9
1
Parent(s):
db0a705
Add custom Streamlit tab styling to improve UI aesthetics
Browse filesImplement CSS styling for Streamlit tabs to enhance visual appearance, including custom height, background colors, and hover states. This update improves the user interface by creating a more polished and consistent tab design.
app.py
CHANGED
@@ -71,6 +71,29 @@ all_sim_vars = ['NBA_GAME_PLAYER_POINTS', 'NBA_GAME_PLAYER_REBOUNDS', 'NBA_GAME_
|
|
71 |
pick6_sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
|
72 |
sim_all_hold = pd.DataFrame(columns=['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
def calculate_poisson(row):
|
75 |
mean_val = row['Mean_Outcome']
|
76 |
threshold = row['Prop']
|
|
|
71 |
pick6_sim_vars = ['Points', 'Rebounds', 'Assists', 'Points + Assists + Rebounds', 'Points + Assists', 'Points + Rebounds', 'Assists + Rebounds']
|
72 |
sim_all_hold = pd.DataFrame(columns=['Player', 'Team', 'Book', 'Prop Type', 'Prop', 'Mean_Outcome', 'Imp Over', 'Trending Over', 'Over%', 'Imp Under', 'Trending Under', 'Under%', 'Bet?', 'Edge'])
|
73 |
|
74 |
+
st.markdown("""
|
75 |
+
<style>
|
76 |
+
|
77 |
+
.stTabs [data-baseweb="tab-list"] {
|
78 |
+
gap: 2px;
|
79 |
+
}
|
80 |
+
|
81 |
+
.stTabs [data-baseweb="tab"] {
|
82 |
+
height: 50px;
|
83 |
+
white-space: pre-wrap;
|
84 |
+
background-color: #F0F2F6;
|
85 |
+
border-radius: 4px 4px 0px 0px;
|
86 |
+
gap: 1px;
|
87 |
+
padding-top: 10px;
|
88 |
+
padding-bottom: 10px;
|
89 |
+
}
|
90 |
+
|
91 |
+
.stTabs [aria-selected="true"] {
|
92 |
+
background-color: #FFFFFF;
|
93 |
+
}
|
94 |
+
|
95 |
+
</style>""", unsafe_allow_html=True)
|
96 |
+
|
97 |
def calculate_poisson(row):
|
98 |
mean_val = row['Mean_Outcome']
|
99 |
threshold = row['Prop']
|