karolmajek commited on
Commit
52e322a
1 Parent(s): 67b6de8

:bug: trying to solve runtime error in :hugging: spaces; detach!

Browse files
Files changed (2) hide show
  1. .gitignore +2 -0
  2. app.py +1 -1
.gitignore ADDED
@@ -0,0 +1,2 @@
 
 
1
+ *.jpg
2
+ *.pt
app.py CHANGED
@@ -43,7 +43,7 @@ def detect(pil_img,names):
43
  img /= 255.0 # 0 - 255 to 0.0 - 1.0
44
 
45
  # Inference
46
- pred = model(img.unsqueeze(0).permute(0,3,1,2), augment=False)[0]
47
 
48
  # Apply NMS
49
  pred = non_max_suppression(pred, conf_thres, iou_thres, classes=None, agnostic=False)
43
  img /= 255.0 # 0 - 255 to 0.0 - 1.0
44
 
45
  # Inference
46
+ pred = model(img.unsqueeze(0).permute(0,3,1,2), augment=False)[0].detach()
47
 
48
  # Apply NMS
49
  pred = non_max_suppression(pred, conf_thres, iou_thres, classes=None, agnostic=False)