Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -43,14 +43,15 @@ def process_image(image_path):
|
|
43 |
output = prediction.cpu().numpy()
|
44 |
depth_image = (output * 255 / np.max(output)).astype("uint8")
|
45 |
depth_image_padded = np.array(
|
46 |
-
|
47 |
)
|
48 |
|
49 |
-
|
50 |
|
|
|
51 |
return depth_image_padded
|
52 |
|
53 |
|
|
|
54 |
examples_images = [[f] for f in sorted(glob.glob("examples/*.jpg"))]
|
55 |
|
56 |
|
|
|
43 |
output = prediction.cpu().numpy()
|
44 |
depth_image = (output * 255 / np.max(output)).astype("uint8")
|
45 |
depth_image_padded = np.array(
|
46 |
+
Image.fromarray(depth_image)
|
47 |
)
|
48 |
|
|
|
49 |
|
50 |
+
# Return as downloadable file
|
51 |
return depth_image_padded
|
52 |
|
53 |
|
54 |
+
|
55 |
examples_images = [[f] for f in sorted(glob.glob("examples/*.jpg"))]
|
56 |
|
57 |
|