Update app.py
Browse files
app.py
CHANGED
@@ -117,26 +117,14 @@ def sepia(input_img):
|
|
117 |
|
118 |
fig = draw_plot(pred_img, seg)
|
119 |
|
120 |
-
tf.keras.backend.clear_session()
|
121 |
|
122 |
return fig
|
123 |
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
self.shape = shape
|
130 |
-
|
131 |
-
def render(self):
|
132 |
-
return gr.File(label="이미지", accept=".jpg,.png", capture_file=True)
|
133 |
-
|
134 |
-
def update(self, value):
|
135 |
-
self.image = tf.image.decode_jpeg(value)
|
136 |
-
|
137 |
-
def get_value(self):
|
138 |
-
return self.image
|
139 |
|
140 |
-
demo = gr.Interface(fn=sepia, inputs=[TensorFlowImageInput(shape=(400, 600))], outputs=["plot"])
|
141 |
-
demo.launch()
|
142 |
|
|
|
|
117 |
|
118 |
fig = draw_plot(pred_img, seg)
|
119 |
|
|
|
120 |
|
121 |
return fig
|
122 |
|
123 |
+
demo = gr.Interface(fn=sepia,
|
124 |
+
inputs=gr.Image(shape=(400, 600)),
|
125 |
+
outputs=['plot'],
|
126 |
+
examples=["side-1.jpg", "side-2.jpg", "side-3.jpg", "side-4.jpg"],
|
127 |
+
allow_flagging='never')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
|
|
|
|
|
129 |
|
130 |
+
demo.launch()
|