Multichem commited on
Commit
7cfaf39
·
1 Parent(s): 6010902

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -8
app.py CHANGED
@@ -693,16 +693,19 @@ with tab3:
693
 
694
  with optimize_container:
695
  optimize_container = st.empty()
696
- st.dataframe(st.session_state.final_outcomes.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
 
697
  with download_container:
698
  download_container = st.empty()
699
- st.download_button(
700
- label="Export Optimals",
701
- data=convert_df_to_csv(st.session_state.final_outcomes_export),
702
- file_name='NFL_optimals_export.csv',
703
- mime='text/csv',
704
- )
 
705
  with freq_container:
706
  freq_container = st.empty()
707
- st.dataframe(st.session_state.player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(expose_format, precision=2), use_container_width = True)
 
708
 
 
693
 
694
  with optimize_container:
695
  optimize_container = st.empty()
696
+ if 'final_outcomes' in st.session_state:
697
+ st.dataframe(st.session_state.final_outcomes.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
698
  with download_container:
699
  download_container = st.empty()
700
+ if 'final_outcomes_export' in st.session_state:
701
+ st.download_button(
702
+ label="Export Optimals",
703
+ data=convert_df_to_csv(st.session_state.final_outcomes_export),
704
+ file_name='NFL_optimals_export.csv',
705
+ mime='text/csv',
706
+ )
707
  with freq_container:
708
  freq_container = st.empty()
709
+ if 'player_freq' in st.session_state:
710
+ st.dataframe(st.session_state.player_freq.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(expose_format, precision=2), use_container_width = True)
711