Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -96,13 +96,46 @@ with tab1:
|
|
96 |
st.download_button(
|
97 |
label="Export Tables",
|
98 |
data=convert_df_to_csv(display_frame),
|
99 |
-
file_name='
|
100 |
mime='text/csv',
|
101 |
)
|
|
|
102 |
with tab2:
|
103 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
104 |
with tab3:
|
105 |
-
st.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
with tab4:
|
107 |
col1, col2 = st.columns([1, 5])
|
108 |
|
|
|
96 |
st.download_button(
|
97 |
label="Export Tables",
|
98 |
data=convert_df_to_csv(display_frame),
|
99 |
+
file_name='NFL_ADPs_Ranks_export.csv',
|
100 |
mime='text/csv',
|
101 |
)
|
102 |
+
|
103 |
with tab2:
|
104 |
+
if st.button("Load/Reset Data", key='reset2'):
|
105 |
+
st.cache_data.clear()
|
106 |
+
adp_table, stacks_table, proj_table = init_baselines()
|
107 |
+
stack_hold_container = st.empty()
|
108 |
+
working_baselines = stacks_table.copy()
|
109 |
+
display_frame = working_baselines.copy()
|
110 |
+
|
111 |
+
with stack_hold_container:
|
112 |
+
stack_hold_container = st.empty()
|
113 |
+
st.dataframe(display_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').background_gradient(cmap='RdYlGn_r', subset=['Min ADP', 'Avg ADP', 'Max ADP', 'Value Build', 'Value']).format(precision=2), height=750, use_container_width = True)
|
114 |
+
st.download_button(
|
115 |
+
label="Export Tables",
|
116 |
+
data=convert_df_to_csv(display_frame),
|
117 |
+
file_name='NFL_Team_Projections_export.csv',
|
118 |
+
mime='text/csv',
|
119 |
+
)
|
120 |
+
|
121 |
with tab3:
|
122 |
+
if st.button("Load/Reset Data", key='reset3'):
|
123 |
+
st.cache_data.clear()
|
124 |
+
adp_table, stacks_table, proj_table = init_baselines()
|
125 |
+
stack_hold_container = st.empty()
|
126 |
+
working_baselines = proj_table.copy()
|
127 |
+
display_frame = working_baselines.copy()
|
128 |
+
|
129 |
+
with stack_hold_container:
|
130 |
+
stack_hold_container = st.empty()
|
131 |
+
st.dataframe(display_frame.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), height=750, use_container_width = True)
|
132 |
+
st.download_button(
|
133 |
+
label="Export Tables",
|
134 |
+
data=convert_df_to_csv(display_frame),
|
135 |
+
file_name='NFL_Player_Projections_export.csv',
|
136 |
+
mime='text/csv',
|
137 |
+
)
|
138 |
+
|
139 |
with tab4:
|
140 |
col1, col2 = st.columns([1, 5])
|
141 |
|