nesticot commited on
Commit
e0d7e18
·
verified ·
1 Parent(s): b5896c9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -381,7 +381,10 @@ def server(input, output, session):
381
  response = requests.get(logo_url)
382
 
383
  img = Image.open(BytesIO(response.content))
384
- ax_logo.imshow(img)
 
 
 
385
  ax_logo.axis("off")
386
  ax.axis('equal')
387
 
@@ -421,9 +424,9 @@ def server(input, output, session):
421
  url = f'https://img.mlbstatic.com/mlb-photos/image/upload/w_640,d_people:generic:headshot:silo:current.png,q_auto:best,f_auto/v1/people/{batter_id}/headshot/silo/current'
422
  response = requests.get(url)
423
  img = Image.open(BytesIO(response.content))
424
- ax_headshot.set_xlim(0, 1)
425
  ax_headshot.set_ylim(0, 1)
426
- ax_headshot.imshow(img, extent=[0, 1, 0, 1], origin='upper')
427
  except PIL.UnidentifiedImageError:
428
  ax_headshot.axis('off')
429
  #return
 
381
  response = requests.get(logo_url)
382
 
383
  img = Image.open(BytesIO(response.content))
384
+
385
+ ax_logo.set_xlim(0, 1.3)
386
+ ax_logo.set_ylim(0, 1)
387
+ ax_logo.imshow(img, extent=[0, 1, 0, 1], origin='upper')
388
  ax_logo.axis("off")
389
  ax.axis('equal')
390
 
 
424
  url = f'https://img.mlbstatic.com/mlb-photos/image/upload/w_640,d_people:generic:headshot:silo:current.png,q_auto:best,f_auto/v1/people/{batter_id}/headshot/silo/current'
425
  response = requests.get(url)
426
  img = Image.open(BytesIO(response.content))
427
+ ax_headshot.set_xlim(0, 1.3)
428
  ax_headshot.set_ylim(0, 1)
429
+ ax_headshot.imshow(img, extent=[0.3, 1.3, 0, 1], origin='upper')
430
  except PIL.UnidentifiedImageError:
431
  ax_headshot.axis('off')
432
  #return