Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -182,9 +182,5 @@ def detect(img,model):
|
|
182 |
|
183 |
return Image.fromarray(im0[:,:,::-1])
|
184 |
|
185 |
-
with torch.no_grad():
|
186 |
-
if opt.update: # update all models (to fix SourceChangeWarning)
|
187 |
-
for opt.weights in ['yolov7-e6.pt']:
|
188 |
-
strip_optimizer(opt.weights)
|
189 |
|
190 |
gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=["yolov7","yolov7-e6e","yolov7-e6"])], gr.Image(type="pil"),title="Yolov7",examples=[["horses.jpeg"]],description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|
|
|
182 |
|
183 |
return Image.fromarray(im0[:,:,::-1])
|
184 |
|
|
|
|
|
|
|
|
|
185 |
|
186 |
gr.Interface(detect,[gr.Image(type="pil"),gr.Dropdown(choices=["yolov7","yolov7-e6e","yolov7-e6"])], gr.Image(type="pil"),title="Yolov7",examples=[["horses.jpeg"]],description="demo for <a href='https://github.com/WongKinYiu/yolov7' style='text-decoration: underline' target='_blank'>WongKinYiu/yolov7</a> Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors").launch()
|