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()
|