Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -670,9 +670,9 @@ def server(input, output, session):
|
|
670 |
#im = plt.imread('players/'+name+'_'+str(last_games)+'.png')
|
671 |
#ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
672 |
#ax.imshow(im)
|
673 |
-
|
674 |
try:
|
675 |
-
image = requests.get(f"https://api-web.nhle.com/v1/player/{
|
676 |
#image = "https://cms.nhl.bamgrid.com/images/headshots/current/168x168/"+str(index_player)+".png"
|
677 |
im = plt.imread(image)
|
678 |
|
|
|
670 |
#im = plt.imread('players/'+name+'_'+str(last_games)+'.png')
|
671 |
#ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
672 |
#ax.imshow(im)
|
673 |
+
#index_player = player_id
|
674 |
try:
|
675 |
+
image = requests.get(f"https://api-web.nhle.com/v1/player/{player_id}/landing/").json()['headshot']
|
676 |
#image = "https://cms.nhl.bamgrid.com/images/headshots/current/168x168/"+str(index_player)+".png"
|
677 |
im = plt.imread(image)
|
678 |
|