nesticot commited on
Commit
a311210
·
verified ·
1 Parent(s): 3a8f39f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -101,7 +101,7 @@ mlb_teams = [
101
 
102
  df_image = pd.DataFrame(mlb_teams)
103
  image_dict = df_image.set_index('team')['logo_url'].to_dict()
104
-
105
 
106
  from shiny import App, reactive, ui, render
107
  from shiny.ui import h2, tags
@@ -135,7 +135,7 @@ app_ui = ui.page_fluid(
135
  ),
136
  ui.row(
137
  ui.column(6, ui.input_switch("switch", "Custom Team?", False)),
138
- ui.column(6, ui.input_select('logo_select', 'Select Custom Logo', image_dict, multiple=False))
139
  ),
140
 
141
  # Row for the action button to generate plot
 
101
 
102
  df_image = pd.DataFrame(mlb_teams)
103
  image_dict = df_image.set_index('team')['logo_url'].to_dict()
104
+ image_dict_flip = df_image.set_index('logo_url')['team'].to_dict()
105
 
106
  from shiny import App, reactive, ui, render
107
  from shiny.ui import h2, tags
 
135
  ),
136
  ui.row(
137
  ui.column(6, ui.input_switch("switch", "Custom Team?", False)),
138
+ ui.column(6, ui.input_select('logo_select', 'Select Custom Logo', image_dict_flip, multiple=False))
139
  ),
140
 
141
  # Row for the action button to generate plot