adpro commited on
Commit
76f9a3f
·
verified ·
1 Parent(s): 1ccfaf2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
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
- ImageOps.pad(Image.fromarray(depth_image), (1280, 720))
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
 
@@ -88,4 +89,4 @@ to generate the autostereogram (Magic Eye)
88
  inputs=[input_image],
89
  outputs=predicted_depth,
90
  )
91
- blocks.launch(debug=True)
 
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
 
 
89
  inputs=[input_image],
90
  outputs=predicted_depth,
91
  )
92
+ blocks.launch(debug=True)