Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -313,7 +313,10 @@ def server(input, output, session):
|
|
| 313 |
values = [str(f'{x:{merged_dict[stat]["format"]}}').strip('%') for x, stat in zip(new_player_metrics.select(merged_dict.keys()).to_numpy()[0], merged_dict.keys())]
|
| 314 |
|
| 315 |
# Get team logo URL
|
| 316 |
-
|
|
|
|
|
|
|
|
|
|
| 317 |
|
| 318 |
# Create a custom colormap
|
| 319 |
color_list = ['#3661AD', '#B4CFD1', '#D82129']
|
|
|
|
| 313 |
values = [str(f'{x:{merged_dict[stat]["format"]}}').strip('%') for x, stat in zip(new_player_metrics.select(merged_dict.keys()).to_numpy()[0], merged_dict.keys())]
|
| 314 |
|
| 315 |
# Get team logo URL
|
| 316 |
+
try:
|
| 317 |
+
logo_url = image_dict[team_dict[player_team_dict[batter_id]]]
|
| 318 |
+
except KeyError:
|
| 319 |
+
logo_url = "https://a.espncdn.com/combiner/i?img=/i/teamlogos/leagues/500/mlb.png&w=500&h=500"
|
| 320 |
|
| 321 |
# Create a custom colormap
|
| 322 |
color_list = ['#3661AD', '#B4CFD1', '#D82129']
|