Spaces:
Running
Running
James McCool
commited on
Commit
·
656c08a
1
Parent(s):
2fef8c4
Reorder tabs and adjust Gamelogs display column positioning
Browse filesUpdate the tab order and layout in the Streamlit app:
- Swap the order of tabs to place Gamelogs first
- Modify the column positioning for the player toggle selection
- Maintain existing functionality while improving UI organization
app.py
CHANGED
|
@@ -705,8 +705,8 @@ if st.button("Run"):
|
|
| 705 |
st.session_state.overall_sim_df = pd.DataFrame(overall_sim_results)
|
| 706 |
st.session_state.overall_sim_df = st.session_state.overall_sim_df.drop_duplicates(subset = ['Player', 'Stat'])
|
| 707 |
|
| 708 |
-
tab1, tab2, tab3, tab4 = st.tabs(["Overall Data", "Individual Game Data", "Opponent Data"
|
| 709 |
-
with
|
| 710 |
if 'player_summary' in st.session_state:
|
| 711 |
st.subheader("Full Match Data")
|
| 712 |
st.dataframe(st.session_state.player_summary.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(display_formats, precision=2), use_container_width = True)
|
|
@@ -786,12 +786,12 @@ with tab3:
|
|
| 786 |
st.subheader("Opponent Boosts")
|
| 787 |
st.dataframe(st.session_state.opp_boost.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 788 |
|
| 789 |
-
with
|
| 790 |
if 'gamelogs_display' in st.session_state:
|
| 791 |
st.subheader("Gamelogs")
|
| 792 |
with st.container():
|
| 793 |
col1, col2, col3 = st.columns([4, 4, 4])
|
| 794 |
-
with
|
| 795 |
player_toggle = st.selectbox("Do you want to view all players or just one?", ['All', 'One'])
|
| 796 |
with col2:
|
| 797 |
if player_toggle == 'One':
|
|
|
|
| 705 |
st.session_state.overall_sim_df = pd.DataFrame(overall_sim_results)
|
| 706 |
st.session_state.overall_sim_df = st.session_state.overall_sim_df.drop_duplicates(subset = ['Player', 'Stat'])
|
| 707 |
|
| 708 |
+
tab1, tab2, tab3, tab4 = st.tabs(["Gamelogs", "Overall Data", "Individual Game Data", "Opponent Data"])
|
| 709 |
+
with tab4:
|
| 710 |
if 'player_summary' in st.session_state:
|
| 711 |
st.subheader("Full Match Data")
|
| 712 |
st.dataframe(st.session_state.player_summary.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(display_formats, precision=2), use_container_width = True)
|
|
|
|
| 786 |
st.subheader("Opponent Boosts")
|
| 787 |
st.dataframe(st.session_state.opp_boost.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
|
| 788 |
|
| 789 |
+
with tab1:
|
| 790 |
if 'gamelogs_display' in st.session_state:
|
| 791 |
st.subheader("Gamelogs")
|
| 792 |
with st.container():
|
| 793 |
col1, col2, col3 = st.columns([4, 4, 4])
|
| 794 |
+
with col1:
|
| 795 |
player_toggle = st.selectbox("Do you want to view all players or just one?", ['All', 'One'])
|
| 796 |
with col2:
|
| 797 |
if player_toggle == 'One':
|