Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -179,11 +179,11 @@ def detect(img):
|
|
179 |
|
180 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
181 |
|
182 |
-
return
|
183 |
|
184 |
with torch.no_grad():
|
185 |
if opt.update: # update all models (to fix SourceChangeWarning)
|
186 |
for opt.weights in ['yolov7.pt']:
|
187 |
strip_optimizer(opt.weights)
|
188 |
|
189 |
-
gr.Interface(detect,gr.Image(type="pil"),
|
|
|
179 |
|
180 |
print(f'Done. ({time.time() - t0:.3f}s)')
|
181 |
|
182 |
+
return im0
|
183 |
|
184 |
with torch.no_grad():
|
185 |
if opt.update: # update all models (to fix SourceChangeWarning)
|
186 |
for opt.weights in ['yolov7.pt']:
|
187 |
strip_optimizer(opt.weights)
|
188 |
|
189 |
+
gr.Interface(detect,gr.Image(type="pil"), βimageβ).launch()
|