Commit
·
19fb473
1
Parent(s):
d4d25d3
Update app.py
Browse files
app.py
CHANGED
@@ -70,7 +70,7 @@ def gen_pred(img=inputs, model=seg_model):
|
|
70 |
pred = np.squeeze(pred, axis=0)
|
71 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
72 |
# pil_image = Image.fromarray(color_coverted)
|
73 |
-
return
|
74 |
|
75 |
|
76 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|
@@ -79,7 +79,7 @@ description = "Upload an image and get prediction mask"
|
|
79 |
|
80 |
gr.Interface(fn=gen_pred,
|
81 |
inputs=inputs,
|
82 |
-
outputs="
|
83 |
title=title,
|
84 |
examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
|
85 |
# css=css_code,
|
|
|
70 |
pred = np.squeeze(pred, axis=0)
|
71 |
# color_coverted = cv2.cvtColor(pred, cv2.COLOR_BGR2RGB)
|
72 |
# pil_image = Image.fromarray(color_coverted)
|
73 |
+
return pred
|
74 |
|
75 |
|
76 |
title = "<h1 style='text-align: center;'>Semantic Segmentation</h1>"
|
|
|
79 |
|
80 |
gr.Interface(fn=gen_pred,
|
81 |
inputs=inputs,
|
82 |
+
outputs="image",
|
83 |
title=title,
|
84 |
examples=[["003e2c95d.jpg"], ["003b50a15.jpg"], ["003b48a9e.jpg"], ["0038cbe45.jpg"], ["00371aa92.jpg"]],
|
85 |
# css=css_code,
|