Spaces:
Runtime error
Runtime error
Commit
Β·
56444f5
1
Parent(s):
afa2b54
Update app.py
Browse files
app.py
CHANGED
@@ -15,12 +15,12 @@ def infer(original_image):
|
|
15 |
image = image.astype("float32") / 255.0
|
16 |
image = np.expand_dims(image, axis=0)
|
17 |
output_image = model.predict(image)
|
18 |
-
|
19 |
|
20 |
|
21 |
|
22 |
output_image = tf.cast((output_image[0, :, :, :] * 255), dtype=np.uint8)
|
23 |
-
|
24 |
|
25 |
return output_image
|
26 |
|
|
|
15 |
image = image.astype("float32") / 255.0
|
16 |
image = np.expand_dims(image, axis=0)
|
17 |
output_image = model.predict(image)
|
18 |
+
print(output_image.shape())
|
19 |
|
20 |
|
21 |
|
22 |
output_image = tf.cast((output_image[0, :, :, :] * 255), dtype=np.uint8)
|
23 |
+
output_image = Image.fromarray(output_image.numpy())
|
24 |
|
25 |
return output_image
|
26 |
|