Update app.py
Browse files
app.py
CHANGED
@@ -209,6 +209,7 @@ def sepia(input_img):
|
|
209 |
img = cv2.imread(input_img).astype(np.float32)
|
210 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
211 |
img_batch = np.expand_dims(img, axis=0)
|
|
|
212 |
|
213 |
outputs = sess.run(None, {"pixel_values": img_batch})[0]
|
214 |
logits = outputs.logits
|
|
|
209 |
img = cv2.imread(input_img).astype(np.float32)
|
210 |
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)
|
211 |
img_batch = np.expand_dims(img, axis=0)
|
212 |
+
img_batch = np.transpose(img_batch, (0, 3, 1, 2))
|
213 |
|
214 |
outputs = sess.run(None, {"pixel_values": img_batch})[0]
|
215 |
logits = outputs.logits
|