Multichem commited on
Commit
dd00607
·
1 Parent(s): 908952d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -104,12 +104,12 @@ with col1:
104
  view_var2 = st.radio("Would you like to view all books or specific ones?", ('All Books', 'Specific Books'), key='view_var2')
105
  if view_var2 == 'All Books':
106
  site_view = game_model.booksid.unique()
107
- elif view_var2 == 'All Books':
108
  site_view = st.multiselect("What books would you like included?", options = game_model.booksid.unique(), key='site_view')
109
 
110
  with col2:
111
  if view_var1 == 'Just win probs':
112
- game_display = just_win_probs
113
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
114
  st.download_button(
115
  label="Export Game Model",
@@ -118,7 +118,7 @@ with col2:
118
  mime='text/csv',
119
  )
120
  elif view_var1 == 'Gimme details':
121
- game_display = game_model
122
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
123
  st.download_button(
124
  label="Export Game Model",
 
104
  view_var2 = st.radio("Would you like to view all books or specific ones?", ('All Books', 'Specific Books'), key='view_var2')
105
  if view_var2 == 'All Books':
106
  site_view = game_model.booksid.unique()
107
+ elif view_var2 == 'Specific Books':
108
  site_view = st.multiselect("What books would you like included?", options = game_model.booksid.unique(), key='site_view')
109
 
110
  with col2:
111
  if view_var1 == 'Just win probs':
112
+ game_display = just_win_probs[just_win_probs['booksid'].isin(site_view)]
113
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
114
  st.download_button(
115
  label="Export Game Model",
 
118
  mime='text/csv',
119
  )
120
  elif view_var1 == 'Gimme details':
121
+ game_display = game_model[game_model['booksid'].isin(site_view)]
122
  st.dataframe(game_display.style.background_gradient(axis=0).background_gradient(cmap='RdYlGn').format(precision=2), use_container_width = True)
123
  st.download_button(
124
  label="Export Game Model",