ghost233lism commited on
Commit
c8957ff
Β·
verified Β·
1 Parent(s): 2a74fb6

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -46
app.py CHANGED
@@ -279,22 +279,7 @@ 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(), 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,23 +296,23 @@ with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.theme
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,21 +349,21 @@ with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.theme
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():
 
279
  return None
280
 
281
 
282
+ with gr.Blocks(title="Depth Anything AC - Depth Estimation Demo", theme=gr.themes.Soft()) as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
283
  gr.Markdown("""
284
  # 🌊 Depth Anything AC - Depth Estimation Demo
285
 
 
296
  with gr.Tabs():
297
  # Image processing tab
298
  with gr.TabItem("πŸ“· Image Depth Estimation"):
299
+ # Main image display row with strict alignment
300
+ with gr.Row():
301
+ input_image = gr.Image(
302
+ label="Upload Image",
303
+ type="pil",
304
+ height=400,
305
+ container=True,
306
+ scale=1
307
+ )
308
 
309
+ output_image = gr.Image(
310
+ label="Depth Map Result",
311
+ type="pil",
312
+ height=400,
313
+ container=True,
314
+ scale=1
315
+ )
316
 
317
  # Controls section in a separate row
318
  with gr.Row():
 
349
 
350
  # Video processing tab
351
  with gr.TabItem("🎬 Video Depth Estimation"):
352
+ # Main video display row with strict alignment
353
+ with gr.Row():
354
+ input_video = gr.Video(
355
+ label="Upload Video",
356
+ height=400,
357
+ container=True,
358
+ scale=1
359
+ )
360
 
361
+ output_video = gr.Video(
362
+ label="Depth Map Video Result",
363
+ height=400,
364
+ container=True,
365
+ scale=1
366
+ )
367
 
368
  # Controls section in a separate row
369
  with gr.Row():