Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -20,7 +20,7 @@ def find(name, path):
|
|
20 |
|
21 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='Content/best.pt', force_reload=True)
|
22 |
def detect(inp):
|
23 |
-
g = (size / max(inp.size)) # gain
|
24 |
#im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
25 |
results = model(inp) # inference
|
26 |
results.render() # updates results.imgs with boxes and labels
|
|
|
20 |
|
21 |
model = torch.hub.load('ultralytics/yolov5', 'custom', path='Content/best.pt', force_reload=True)
|
22 |
def detect(inp):
|
23 |
+
#g = (size / max(inp.size)) # gain
|
24 |
#im = im.resize((int(x * g) for x in im.size), Image.ANTIALIAS) # resize
|
25 |
results = model(inp) # inference
|
26 |
results.render() # updates results.imgs with boxes and labels
|