Spaces:
Running
on
Zero
Running
on
Zero
CharlieAmalet
commited on
Update depth.py
Browse files
depth.py
CHANGED
@@ -17,6 +17,7 @@ def save_raw_16bit(depth, fpath="raw.png"):
|
|
17 |
return depth
|
18 |
|
19 |
# Your image processing function
|
|
|
20 |
def process_image(model, image: Image.Image):
|
21 |
image = image.convert("RGB")
|
22 |
|
@@ -25,7 +26,6 @@ def process_image(model, image: Image.Image):
|
|
25 |
processed_array = save_raw_16bit(colorize(out)[:, :, 0])
|
26 |
return Image.fromarray(processed_array)
|
27 |
|
28 |
-
@spaces.GPU
|
29 |
def depth_interface(model, device):
|
30 |
with gr.Row():
|
31 |
inputs=gr.Image(label="Input Image", type='pil') # Input is an image
|
|
|
17 |
return depth
|
18 |
|
19 |
# Your image processing function
|
20 |
+
@spaces.GPU(enable_queue=True)
|
21 |
def process_image(model, image: Image.Image):
|
22 |
image = image.convert("RGB")
|
23 |
|
|
|
26 |
processed_array = save_raw_16bit(colorize(out)[:, :, 0])
|
27 |
return Image.fromarray(processed_array)
|
28 |
|
|
|
29 |
def depth_interface(model, device):
|
30 |
with gr.Row():
|
31 |
inputs=gr.Image(label="Input Image", type='pil') # Input is an image
|