app.py
CHANGED
@@ -102,11 +102,22 @@ def sepia(input_img):
|
|
102 |
fig = draw_plot(pred_img, seg)
|
103 |
return fig
|
104 |
|
105 |
-
demo = gr.Interface(fn=sepia,
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
|
112 |
demo.launch()
|
|
|
102 |
fig = draw_plot(pred_img, seg)
|
103 |
return fig
|
104 |
|
105 |
+
# demo = gr.Interface(fn=sepia,
|
106 |
+
# inputs=gr.Image(shape=(400, 600)),
|
107 |
+
# outputs=['plot'],
|
108 |
+
# examples=["22.jpg", "33.jpg"],
|
109 |
+
# allow_flagging='never')
|
110 |
+
demo = gr.Interface(
|
111 |
+
fn=sepia,
|
112 |
+
inputs=gr.Image(shape=(400, 600)),
|
113 |
+
outputs='plot', # 'plot' λμ 'image'λ μ¬μ© κ°λ₯
|
114 |
+
examples=["22.jpg", "33.jpg"],
|
115 |
+
allow_flagging='never',
|
116 |
+
title="Image Segmentation with Sepia Effect",
|
117 |
+
description="Use the sepia effect to visualize image segmentation.",
|
118 |
+
theme="huggingface",
|
119 |
+
live=True, # μ€μκ° μ
λ°μ΄νΈ νμ±ν
|
120 |
+
interpretation="default", # λλ 'none'μΌλ‘ μ€μ νμ¬ ν΄μ κΈ°λ₯ λΉνμ±ν
|
121 |
+
)
|
122 |
|
123 |
demo.launch()
|