akhaliq HF staff commited on
Commit
4a77d6e
β€’
1 Parent(s): 5250e55

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -179,11 +179,11 @@ def detect(img):
179
 
180
  print(f'Done. ({time.time() - t0:.3f}s)')
181
 
182
- return "runs/detect/exp/test.jpg"
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()
 
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()