Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -485,7 +485,7 @@ def server(input, output, session):
|
|
485 |
title_spot = f'{df_plot.pitcher_name.values[0]}'
|
486 |
|
487 |
|
488 |
-
ax0.text(x=0.5,y=0
|
489 |
ax0.text(x=0.5,y=0.5,s='Season Pitching Summary',fontname='Calibri',ha='center',fontsize=40,va='top',fontstyle='italic')
|
490 |
|
491 |
|
@@ -510,7 +510,7 @@ def server(input, output, session):
|
|
510 |
test_mage = plt.imread(url)
|
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.
|
514 |
ab = AnnotationBbox(imagebox, (0.125, 0.4), frameon = False)
|
515 |
ax0.add_artist(ab)
|
516 |
|
@@ -530,7 +530,7 @@ def server(input, output, session):
|
|
530 |
# im = Image.open(BytesIO(response.content))
|
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.
|
534 |
ab = AnnotationBbox(imagebox, (0.875, 0.4), frameon = False)
|
535 |
ax0.add_artist(ab)
|
536 |
except IndexError:
|
@@ -779,7 +779,7 @@ def server(input, output, session):
|
|
779 |
test_mage = plt.imread(url)
|
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.
|
783 |
ab = AnnotationBbox(imagebox, (0.125, 0.4), frameon = False)
|
784 |
ax0.add_artist(ab)
|
785 |
|
@@ -798,7 +798,7 @@ def server(input, output, session):
|
|
798 |
# im = Image.open(BytesIO(response.content))
|
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.
|
802 |
ab = AnnotationBbox(imagebox, (0.875, 0.4), frameon = False)
|
803 |
ax0.add_artist(ab)
|
804 |
except IndexError:
|
|
|
485 |
title_spot = f'{df_plot.pitcher_name.values[0]}'
|
486 |
|
487 |
|
488 |
+
ax0.text(x=0.5,y=1.0,s=title_spot,fontname='Calibri',ha='center',fontsize=56,va='top')
|
489 |
ax0.text(x=0.5,y=0.5,s='Season Pitching Summary',fontname='Calibri',ha='center',fontsize=40,va='top',fontstyle='italic')
|
490 |
|
491 |
|
|
|
510 |
test_mage = plt.imread(url)
|
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.4), frameon = False)
|
515 |
ax0.add_artist(ab)
|
516 |
|
|
|
530 |
# im = Image.open(BytesIO(response.content))
|
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.4), frameon = False)
|
535 |
ax0.add_artist(ab)
|
536 |
except IndexError:
|
|
|
779 |
test_mage = plt.imread(url)
|
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.4), frameon = False)
|
784 |
ax0.add_artist(ab)
|
785 |
|
|
|
798 |
# im = Image.open(BytesIO(response.content))
|
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.4), frameon = False)
|
803 |
ax0.add_artist(ab)
|
804 |
except IndexError:
|