과제 2
Browse files
app.py
CHANGED
@@ -15,7 +15,7 @@ model = TFSegformerForSemanticSegmentation.from_pretrained(
|
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
18 |
-
|
19 |
return [
|
20 |
[255, 0, 0],
|
21 |
[85, 0, 0],
|
@@ -103,6 +103,8 @@ def sepia(input_img):
|
|
103 |
demo = gr.Interface(fn=sepia,
|
104 |
inputs=gr.Image(shape=(400, 600)),
|
105 |
outputs=['plot'],
|
106 |
-
examples=["
|
107 |
allow_flagging='never')
|
108 |
-
|
|
|
|
|
|
15 |
)
|
16 |
|
17 |
def ade_palette():
|
18 |
+
"""ADE20K palette that maps each class to RGB values."""
|
19 |
return [
|
20 |
[255, 0, 0],
|
21 |
[85, 0, 0],
|
|
|
103 |
demo = gr.Interface(fn=sepia,
|
104 |
inputs=gr.Image(shape=(400, 600)),
|
105 |
outputs=['plot'],
|
106 |
+
examples=["person-1.jpg", "person-2.jpg", "person-3.jpg", "person-4.jpg", "person-5.jpg"],
|
107 |
allow_flagging='never')
|
108 |
+
|
109 |
+
|
110 |
+
demo.launch()
|