Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
•
f7173df
1
Parent(s):
c7fc704
Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
|
3 |
-
|
4 |
import torch
|
5 |
from utils import get_image_from_url, colorize
|
6 |
from PIL import Image
|
@@ -17,10 +15,10 @@ zoe = model_zoe_n.to(DEVICE)
|
|
17 |
|
18 |
def process_image(image):
|
19 |
depth_numpy = zoe.infer_pil(image) # as numpy
|
20 |
-
|
21 |
depth_pil = zoe.infer_pil(image, output_type="pil") # as 16-bit PIL Image
|
|
|
22 |
|
23 |
-
return
|
24 |
|
25 |
interface = gr.Interface(fn=process_image,
|
26 |
inputs=[gr.Image(type="pil")],
|
|
|
1 |
import gradio as gr
|
|
|
|
|
2 |
import torch
|
3 |
from utils import get_image_from_url, colorize
|
4 |
from PIL import Image
|
|
|
15 |
|
16 |
def process_image(image):
|
17 |
depth_numpy = zoe.infer_pil(image) # as numpy
|
|
|
18 |
depth_pil = zoe.infer_pil(image, output_type="pil") # as 16-bit PIL Image
|
19 |
+
colored_depth = colorize(depth)
|
20 |
|
21 |
+
return colored_depth
|
22 |
|
23 |
interface = gr.Interface(fn=process_image,
|
24 |
inputs=[gr.Image(type="pil")],
|