Spaces:
Sleeping
Sleeping
Commit
·
e463c49
1
Parent(s):
ad98131
Update app.py
Browse files
app.py
CHANGED
@@ -97,11 +97,17 @@ def sepia(input_img):
|
|
97 |
pred_img = pred_img.astype(np.uint8)
|
98 |
|
99 |
fig = draw_plot(pred_img, seg)
|
|
|
|
|
|
|
|
|
|
|
|
|
100 |
return fig
|
101 |
|
102 |
demo = gr.Interface(fn=sepia,
|
103 |
inputs=gr.Image(shape=(400, 600)),
|
104 |
-
outputs=['plot'],
|
105 |
examples=["citiscapes-1.jpeg", "citiscapes-2.jpeg"],
|
106 |
allow_flagging='never')
|
107 |
|
|
|
97 |
pred_img = pred_img.astype(np.uint8)
|
98 |
|
99 |
fig = draw_plot(pred_img, seg)
|
100 |
+
|
101 |
+
class_probabilities = {
|
102 |
+
labels_list[i]: probabilities[:, :, i].numpy() for i in range(len(labels_list))
|
103 |
+
}
|
104 |
+
print(class_probabilities)
|
105 |
+
|
106 |
return fig
|
107 |
|
108 |
demo = gr.Interface(fn=sepia,
|
109 |
inputs=gr.Image(shape=(400, 600)),
|
110 |
+
outputs=['plot', "text"],
|
111 |
examples=["citiscapes-1.jpeg", "citiscapes-2.jpeg"],
|
112 |
allow_flagging='never')
|
113 |
|