Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -128,22 +128,29 @@ example_paths = [
|
|
| 128 |
]
|
| 129 |
|
| 130 |
with gr.Blocks() as demo:
|
| 131 |
-
gr.Markdown("# DAP Depth Prediction Demo
|
| 132 |
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
|
| 145 |
-
|
| 146 |
-
|
|
|
|
|
|
|
| 147 |
|
| 148 |
demo.launch(
|
| 149 |
server_name="0.0.0.0",
|
|
|
|
| 128 |
]
|
| 129 |
|
| 130 |
with gr.Blocks() as demo:
|
| 131 |
+
gr.Markdown("# DAP Depth Prediction Demo")
|
| 132 |
|
| 133 |
+
with gr.Row():
|
| 134 |
+
# ================= Left =================
|
| 135 |
+
with gr.Column(scale=1):
|
| 136 |
+
inp = gr.Image(type="numpy", label="Input Image", height=360)
|
| 137 |
|
| 138 |
+
gr.Markdown("### Examples (click to load)")
|
| 139 |
+
gr.Examples(
|
| 140 |
+
examples=example_paths,
|
| 141 |
+
inputs=inp,
|
| 142 |
+
label=None,
|
| 143 |
+
)
|
| 144 |
|
| 145 |
+
btn = gr.Button("Run", variant="primary")
|
| 146 |
|
| 147 |
+
# ================= Right =================
|
| 148 |
+
with gr.Column(scale=2):
|
| 149 |
+
out_color = gr.Image(type="numpy", label="Depth (Color)", height=260)
|
| 150 |
+
out_gray = gr.Image(type="numpy", label="Depth (Gray)", height=260)
|
| 151 |
+
out_npy = gr.File(label="Depth (.npy)")
|
| 152 |
+
|
| 153 |
+
btn.click(fn=predict, inputs=inp, outputs=[out_color, out_gray, out_npy])
|
| 154 |
|
| 155 |
demo.launch(
|
| 156 |
server_name="0.0.0.0",
|