Spaces:
Running
Running
Upload app.py
Browse files
app.py
CHANGED
@@ -279,7 +279,22 @@ def predict_video_depth(input_video, colormap_choice, progress=gr.Progress()):
|
|
279 |
return None
|
280 |
|
281 |
|
282 |
-
with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.themes.Soft()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
gr.Markdown("""
|
284 |
# π Depth Anything AC - Depth Estimation Demo
|
285 |
|
@@ -296,23 +311,23 @@ with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.theme
|
|
296 |
with gr.Tabs():
|
297 |
# Image processing tab
|
298 |
with gr.TabItem("π· Image Depth Estimation"):
|
299 |
-
# Main image display row with
|
300 |
-
with gr.Row():
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
|
317 |
# Controls section in a separate row
|
318 |
with gr.Row():
|
@@ -349,21 +364,21 @@ with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.theme
|
|
349 |
|
350 |
# Video processing tab
|
351 |
with gr.TabItem("π¬ Video Depth Estimation"):
|
352 |
-
# Main video display row with
|
353 |
-
with gr.Row():
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
|
368 |
# Controls section in a separate row
|
369 |
with gr.Row():
|
|
|
279 |
return None
|
280 |
|
281 |
|
282 |
+
with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.themes.Soft(), css="""
|
283 |
+
.image-container {
|
284 |
+
height: 400px !important;
|
285 |
+
min-height: 400px !important;
|
286 |
+
max-height: 400px !important;
|
287 |
+
display: flex !important;
|
288 |
+
align-items: flex-start !important;
|
289 |
+
}
|
290 |
+
.video-container {
|
291 |
+
height: 400px !important;
|
292 |
+
min-height: 400px !important;
|
293 |
+
max-height: 400px !important;
|
294 |
+
display: flex !important;
|
295 |
+
align-items: flex-start !important;
|
296 |
+
}
|
297 |
+
""") as demo:
|
298 |
gr.Markdown("""
|
299 |
# π Depth Anything AC - Depth Estimation Demo
|
300 |
|
|
|
311 |
with gr.Tabs():
|
312 |
# Image processing tab
|
313 |
with gr.TabItem("π· Image Depth Estimation"):
|
314 |
+
# Main image display row with forced alignment
|
315 |
+
with gr.Row(equal_height=True, variant="panel"):
|
316 |
+
with gr.Column(min_width=400, scale=1):
|
317 |
+
input_image = gr.Image(
|
318 |
+
label="Upload Image",
|
319 |
+
type="pil",
|
320 |
+
height=400,
|
321 |
+
elem_classes=["image-container"]
|
322 |
+
)
|
323 |
|
324 |
+
with gr.Column(min_width=400, scale=1):
|
325 |
+
output_image = gr.Image(
|
326 |
+
label="Depth Map Result",
|
327 |
+
type="pil",
|
328 |
+
height=400,
|
329 |
+
elem_classes=["image-container"]
|
330 |
+
)
|
331 |
|
332 |
# Controls section in a separate row
|
333 |
with gr.Row():
|
|
|
364 |
|
365 |
# Video processing tab
|
366 |
with gr.TabItem("π¬ Video Depth Estimation"):
|
367 |
+
# Main video display row with forced alignment
|
368 |
+
with gr.Row(equal_height=True, variant="panel"):
|
369 |
+
with gr.Column(min_width=400, scale=1):
|
370 |
+
input_video = gr.Video(
|
371 |
+
label="Upload Video",
|
372 |
+
height=400,
|
373 |
+
elem_classes=["video-container"]
|
374 |
+
)
|
375 |
|
376 |
+
with gr.Column(min_width=400, scale=1):
|
377 |
+
output_video = gr.Video(
|
378 |
+
label="Depth Map Video Result",
|
379 |
+
height=400,
|
380 |
+
elem_classes=["video-container"]
|
381 |
+
)
|
382 |
|
383 |
# Controls section in a separate row
|
384 |
with gr.Row():
|