Sanan commited on
Commit
1270153
·
1 Parent(s): 3f09e0c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -5,9 +5,9 @@ from PIL import Image
5
 
6
  model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', force_reload=True)
7
 
8
- def yolo(im, size=640):
9
- g = (size / max(im.size)) # gain
10
- im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
11
 
12
  results = model(im) # inference
13
  results.render() # updates results.imgs with boxes and labels
 
5
 
6
  model = torch.hub.load('ultralytics/yolov5', 'custom', path='best.pt', force_reload=True)
7
 
8
+ def yolo(im):
9
+ #g = (size / max(im.size)) # gain
10
+ # im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
11
 
12
  results = model(im) # inference
13
  results.render() # updates results.imgs with boxes and labels