nathanjc commited on
Commit
5ffae03
·
1 Parent(s): 189d45d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -209,9 +209,9 @@ def get_output(image):
209
  with torch.no_grad():
210
  bbox,output_path = detect(opt)
211
  if os.path.exists(output_path):
212
- return Image.open(output_path)
213
  else:
214
- return image
215
 
216
  gr.Interface(fn=get_output,
217
  inputs=gr.Image(type = "pil", label="Your image"),
 
209
  with torch.no_grad():
210
  bbox,output_path = detect(opt)
211
  if os.path.exists(output_path):
212
+ return np.array(Image.open(output_path))
213
  else:
214
+ return np.array(image)
215
 
216
  gr.Interface(fn=get_output,
217
  inputs=gr.Image(type = "pil", label="Your image"),