Update app.py
Browse files
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',
|
| 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
|