akhaliq HF staff commited on
Commit
f39663a
Β·
1 Parent(s): cfb47fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -48,9 +48,11 @@ def detect(img,model):
48
  opt = parser.parse_args()
49
  img.save("Inference/test.jpg")
50
  if model == "yolov7":
51
- source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size=640, opt.trace
 
52
  if model == "yolov7-e6e" or "yolov7-e6":
53
- source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size=1280, opt.trace
 
54
  save_img = True # save inference images
55
  webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
56
  ('rtsp://', 'rtmp://', 'http://', 'https://'))
 
48
  opt = parser.parse_args()
49
  img.save("Inference/test.jpg")
50
  if model == "yolov7":
51
+ opt.img_size=640
52
+ source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
53
  if model == "yolov7-e6e" or "yolov7-e6":
54
+ opt.img_size=1280
55
+ source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
56
  save_img = True # save inference images
57
  webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
58
  ('rtsp://', 'rtmp://', 'http://', 'https://'))