SakshiRathi77 commited on
Commit
aceebcb
1 Parent(s): 8e909d4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -157,7 +157,7 @@ def predict(image_path, weights='best.pt', imgsz=640, conf_thres=0.1, iou_thres=
157
  # Initialize
158
  device = select_device('0')
159
  # model = DetectMultiBackend(weights='best.pt', device="0", fp16=False, data='data/coco.yaml')
160
- model = DetectMultiBackend(weights='best.pt', device="0", fp16=False)
161
  stride, names, pt = model.stride, model.names, model.pt
162
 
163
  # Load image
@@ -172,6 +172,6 @@ def predict(image_path, weights='best.pt', imgsz=640, conf_thres=0.1, iou_thres=
172
 
173
  # Inference
174
  # pred = model(img, augment=False, visualize=False)
175
- pred = model(img)
176
  # Apply NMS
177
  pred = non_max_suppression(pred[0][0], conf_thres, iou_thres, classes=None, max_det=1000)
 
157
  # Initialize
158
  device = select_device('0')
159
  # model = DetectMultiBackend(weights='best.pt', device="0", fp16=False, data='data/coco.yaml')
160
+ model = DetectMultiBackend(weights='best.pt', device="0", fp16=False)
161
  stride, names, pt = model.stride, model.names, model.pt
162
 
163
  # Load image
 
172
 
173
  # Inference
174
  # pred = model(img, augment=False, visualize=False)
175
+ pred = model(img)
176
  # Apply NMS
177
  pred = non_max_suppression(pred[0][0], conf_thres, iou_thres, classes=None, max_det=1000)