adpro commited on
Commit
76082d2
·
verified ·
1 Parent(s): 2ea3e93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -43,16 +43,19 @@ def process_image(image_path):
43
 
44
  title = "Demo: zero-shot depth estimation with DPT + 3D Point Cloud"
45
  description = "This demo is a variation from the original <a href='https://huggingface.co/spaces/nielsr/dpt-depth-estimation' target='_blank'>DPT Demo</a>. It uses the DPT model to predict the depth of an image and then uses 3D Point Cloud to create a 3D object."
46
-
47
 
48
  iface = gr.Interface(
49
  fn=process_image,
50
  inputs=[gr.Image(type="filepath", label="Input Image")],
51
  outputs=[
52
  gr.Image(label="predicted depth", type="pil"),
 
 
53
  ],
54
  title=title,
55
  description=description,
 
56
  allow_flagging="never",
57
  cache_examples=False,
58
  )
 
43
 
44
  title = "Demo: zero-shot depth estimation with DPT + 3D Point Cloud"
45
  description = "This demo is a variation from the original <a href='https://huggingface.co/spaces/nielsr/dpt-depth-estimation' target='_blank'>DPT Demo</a>. It uses the DPT model to predict the depth of an image and then uses 3D Point Cloud to create a 3D object."
46
+ examples = [["examples/" + img] for img in os.listdir("examples/")]
47
 
48
  iface = gr.Interface(
49
  fn=process_image,
50
  inputs=[gr.Image(type="filepath", label="Input Image")],
51
  outputs=[
52
  gr.Image(label="predicted depth", type="pil"),
53
+ gr.Model3D(label="3d mesh reconstruction", clear_color=[1.0, 1.0, 1.0, 1.0]),
54
+ gr.File(label="3d gLTF"),
55
  ],
56
  title=title,
57
  description=description,
58
+ examples=examples,
59
  allow_flagging="never",
60
  cache_examples=False,
61
  )