zino36 commited on
Commit
beadcc7
·
verified ·
1 Parent(s): bf3f489

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -13,7 +13,6 @@ from gradio_imageslider import ImageSlider
13
  from huggingface_hub import hf_hub_download
14
  from safetensors.torch import load_file
15
  from transformers import pipeline
16
- from PIL import Image
17
  from depth_anything_v2.dpt import DepthAnythingV2
18
 
19
  css = """
@@ -90,7 +89,7 @@ with gr.Blocks(css=css) as demo:
90
 
91
  depth = predict_depth(image)
92
 
93
- raw_depth = Image.fromarray(depth.astype('uint16'))
94
  tmp_raw_depth = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
95
  raw_depth.save(tmp_raw_depth.name)
96
 
 
13
  from huggingface_hub import hf_hub_download
14
  from safetensors.torch import load_file
15
  from transformers import pipeline
 
16
  from depth_anything_v2.dpt import DepthAnythingV2
17
 
18
  css = """
 
89
 
90
  depth = predict_depth(image)
91
 
92
+ raw_depth = Image.fromarray(depth)
93
  tmp_raw_depth = tempfile.NamedTemporaryFile(suffix='.png', delete=False)
94
  raw_depth.save(tmp_raw_depth.name)
95