Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -40,8 +40,8 @@ def segment_buildings(im):
|
|
| 40 |
instance_mode=ColorMode.IMAGE_BW
|
| 41 |
)
|
| 42 |
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
|
| 43 |
-
|
| 44 |
-
return
|
| 45 |
|
| 46 |
# gradio components
|
| 47 |
"""
|
|
@@ -61,5 +61,4 @@ gr.Interface(segment_buildings,
|
|
| 61 |
outputs = outputs,
|
| 62 |
title = title,
|
| 63 |
enable_queue = True,
|
| 64 |
-
description = description).launch()
|
| 65 |
-
|
|
|
|
| 40 |
instance_mode=ColorMode.IMAGE_BW
|
| 41 |
)
|
| 42 |
out = v.draw_instance_predictions(outputs["instances"].to("cpu"))
|
| 43 |
+
|
| 44 |
+
return Image.fromarray(out.get_image()[:, :, ::-1])
|
| 45 |
|
| 46 |
# gradio components
|
| 47 |
"""
|
|
|
|
| 61 |
outputs = outputs,
|
| 62 |
title = title,
|
| 63 |
enable_queue = True,
|
| 64 |
+
description = description).launch()
|
|
|