Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -566,7 +566,10 @@ def server(input, output, session):
|
|
| 566 |
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())]
|
| 567 |
|
| 568 |
# Get team logo URL
|
| 569 |
-
|
|
|
|
|
|
|
|
|
|
| 570 |
|
| 571 |
# Create a custom colormap
|
| 572 |
color_list = ['#3661AD', '#B4CFD1', '#D82129']
|
|
|
|
| 566 |
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())]
|
| 567 |
|
| 568 |
# Get team logo URL
|
| 569 |
+
try:
|
| 570 |
+
logo_url = image_dict[team_dict[player_team_dict[batter_id]]]
|
| 571 |
+
except KeyError:
|
| 572 |
+
logo_url = "https://a.espncdn.com/combiner/i?img=/i/teamlogos/leagues/500/mlb.png&w=500&h=500"
|
| 573 |
|
| 574 |
# Create a custom colormap
|
| 575 |
color_list = ['#3661AD', '#B4CFD1', '#D82129']
|