Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"),
|