Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -511,7 +511,7 @@ def server(input, output, session):
|
|
511 |
except urllib.error.HTTPError as err:
|
512 |
url = f'https://img.mlbstatic.com/mlb-photos/image/upload/d_people:generic:headshot:67:current.png/w_213,q_auto:best/v1/people/1/headshot/67/current.png'
|
513 |
imagebox = OffsetImage(test_mage, zoom = 0.6)
|
514 |
-
ab = AnnotationBbox(imagebox, (0.125, 0.
|
515 |
ax0.add_artist(ab)
|
516 |
|
517 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
@@ -531,7 +531,7 @@ def server(input, output, session):
|
|
531 |
# im = plt.imread(team_logos[team_logos['id'] == player_bio['people'][0]['currentTeam']['parentOrgId']]['imageLink'].values[0])
|
532 |
# ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
533 |
imagebox = OffsetImage(im, zoom = 0.48)
|
534 |
-
ab = AnnotationBbox(imagebox, (0.875, 0.
|
535 |
ax0.add_artist(ab)
|
536 |
except IndexError:
|
537 |
print()
|
@@ -780,7 +780,7 @@ def server(input, output, session):
|
|
780 |
except urllib.error.HTTPError as err:
|
781 |
url = f'https://img.mlbstatic.com/mlb-photos/image/upload/d_people:generic:headshot:67:current.png/w_213,q_auto:best/v1/people/1/headshot/67/current.png'
|
782 |
imagebox = OffsetImage(test_mage, zoom = 0.6)
|
783 |
-
ab = AnnotationBbox(imagebox, (0.125, 0.
|
784 |
ax0.add_artist(ab)
|
785 |
|
786 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
@@ -799,7 +799,7 @@ def server(input, output, session):
|
|
799 |
# im = plt.imread(team_logos[team_logos['id'] == player_bio['people'][0]['currentTeam']['parentOrgId']]['imageLink'].values[0])
|
800 |
# ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
801 |
imagebox = OffsetImage(im, zoom = 0.48)
|
802 |
-
ab = AnnotationBbox(imagebox, (0.875, 0.
|
803 |
ax0.add_artist(ab)
|
804 |
except IndexError:
|
805 |
print()
|
|
|
511 |
except urllib.error.HTTPError as err:
|
512 |
url = f'https://img.mlbstatic.com/mlb-photos/image/upload/d_people:generic:headshot:67:current.png/w_213,q_auto:best/v1/people/1/headshot/67/current.png'
|
513 |
imagebox = OffsetImage(test_mage, zoom = 0.6)
|
514 |
+
ab = AnnotationBbox(imagebox, (0.125, 0.5), frameon = False)
|
515 |
ax0.add_artist(ab)
|
516 |
|
517 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
|
|
531 |
# im = plt.imread(team_logos[team_logos['id'] == player_bio['people'][0]['currentTeam']['parentOrgId']]['imageLink'].values[0])
|
532 |
# ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
533 |
imagebox = OffsetImage(im, zoom = 0.48)
|
534 |
+
ab = AnnotationBbox(imagebox, (0.875, 0.5), frameon = False)
|
535 |
ax0.add_artist(ab)
|
536 |
except IndexError:
|
537 |
print()
|
|
|
780 |
except urllib.error.HTTPError as err:
|
781 |
url = f'https://img.mlbstatic.com/mlb-photos/image/upload/d_people:generic:headshot:67:current.png/w_213,q_auto:best/v1/people/1/headshot/67/current.png'
|
782 |
imagebox = OffsetImage(test_mage, zoom = 0.6)
|
783 |
+
ab = AnnotationBbox(imagebox, (0.125, 0.5), frameon = False)
|
784 |
ax0.add_artist(ab)
|
785 |
|
786 |
player_bio = requests.get(url=f"https://statsapi.mlb.com/api/v1/people?personIds={pitcher_id_select}&hydrate=currentTeam").json()
|
|
|
799 |
# im = plt.imread(team_logos[team_logos['id'] == player_bio['people'][0]['currentTeam']['parentOrgId']]['imageLink'].values[0])
|
800 |
# ax = fig.add_axes([0,0,1,0.85], anchor='C', zorder=1)
|
801 |
imagebox = OffsetImage(im, zoom = 0.48)
|
802 |
+
ab = AnnotationBbox(imagebox, (0.875, 0.5), frameon = False)
|
803 |
ax0.add_artist(ab)
|
804 |
except IndexError:
|
805 |
print()
|