Update app.py
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def sepia(input_img):
|
|
102 |
logits = tf.transpose(logits, [0, 2, 3, 1])
|
103 |
logits = tf.image.resize(
|
104 |
logits, input_img.size[::-1]
|
105 |
-
) # We reverse the shape of `image` because `image.size` returns width and height.
|
106 |
seg = tf.math.argmax(logits, axis=-1)[0]
|
107 |
|
108 |
color_seg = np.zeros(
|
@@ -126,4 +126,5 @@ demo = gr.Interface(fn=sepia,
|
|
126 |
examples=["example1.jpg", "example2.jpg", "example3.jpeg", "example4.jpg"],
|
127 |
allow_flagging='never')
|
128 |
|
129 |
-
|
|
|
|
102 |
logits = tf.transpose(logits, [0, 2, 3, 1])
|
103 |
logits = tf.image.resize(
|
104 |
logits, input_img.size[::-1]
|
105 |
+
) # We reverse the shape of `image` because `image.size` returns width and height.
|
106 |
seg = tf.math.argmax(logits, axis=-1)[0]
|
107 |
|
108 |
color_seg = np.zeros(
|
|
|
126 |
examples=["example1.jpg", "example2.jpg", "example3.jpeg", "example4.jpg"],
|
127 |
allow_flagging='never')
|
128 |
|
129 |
+
|
130 |
+
demo.launch()
|