Sa-m commited on
Commit
d29e18a
·
1 Parent(s): 6200c0a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -46,7 +46,9 @@ def Custom_detect(img):
46
  source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
47
  save_img = True
48
  webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(('rtsp://', 'rtmp://', 'http://', 'https://'))
49
- save_dir = Path(increment_path(Path(opt.project)/opt.name,exist_ok=opt.exist_ok))(save_dir / 'labels' if save_txt else save_dir).mkdir(parents=True, exist_ok=True)
 
 
50
  set_logging()
51
  device = select_device(opt.device)
52
  half = device.type != 'cpu'
 
46
  source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
47
  save_img = True
48
  webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(('rtsp://', 'rtmp://', 'http://', 'https://'))
49
+ save_dir = Path(increment_path(Path(opt.project)/opt.name,exist_ok=opt.exist_ok))
50
+
51
+ (save_dir / 'labels' if save_txt else save_dir).mkdir(parents=True, exist_ok=True)
52
  set_logging()
53
  device = select_device(opt.device)
54
  half = device.type != 'cpu'