Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -9,9 +9,6 @@ from PIL import Image
|
|
9 |
# TODO: Allow user selectable model?
|
10 |
model = torch.hub.load('ultralytics/yolov5', 'custom', "model_weights/face_masks_v8.pt")
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
def yolo(im, size=640):
|
16 |
g = (size / max(im.size)) # gain
|
17 |
im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
|
|
9 |
# TODO: Allow user selectable model?
|
10 |
model = torch.hub.load('ultralytics/yolov5', 'custom', "model_weights/face_masks_v8.pt")
|
11 |
|
|
|
|
|
|
|
12 |
def yolo(im, size=640):
|
13 |
g = (size / max(im.size)) # gain
|
14 |
im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|