Spaces:
Runtime error
Runtime error
fix indent
Browse files
app.py
CHANGED
@@ -47,9 +47,9 @@ def detect(img,model):
|
|
47 |
parser.add_argument('--trace', action='store_true', help='trace model')
|
48 |
opt = parser.parse_args()
|
49 |
|
50 |
-
if model == "yolov7":
|
51 |
-
|
52 |
-
img.save("Inference/test.jpg")
|
53 |
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
54 |
save_img = True # save inference images
|
55 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|
|
|
47 |
parser.add_argument('--trace', action='store_true', help='trace model')
|
48 |
opt = parser.parse_args()
|
49 |
|
50 |
+
if model == "yolov7":
|
51 |
+
img.resize((640, 640))
|
52 |
+
img.save("Inference/test.jpg")
|
53 |
source, weights, view_img, save_txt, imgsz, trace = opt.source, opt.weights, opt.view_img, opt.save_txt, opt.img_size, opt.trace
|
54 |
save_img = True # save inference images
|
55 |
webcam = source.isnumeric() or source.endswith('.txt') or source.lower().startswith(
|