Update app.py
Browse files
app.py
CHANGED
|
@@ -666,24 +666,21 @@ def create_professional_interface():
|
|
| 666 |
gr.Markdown("### π€ Input Configuration")
|
| 667 |
|
| 668 |
video_input = gr.Video(
|
| 669 |
-
label="Upload Video",
|
| 670 |
-
height=300
|
| 671 |
-
info="Supported: MP4, AVI, MOV, MKV, WebM (max 5 minutes)"
|
| 672 |
)
|
| 673 |
|
| 674 |
with gr.Tab("π¨ Background"):
|
| 675 |
background_preset = gr.Dropdown(
|
| 676 |
choices=preset_choices,
|
| 677 |
value="gradient:ocean",
|
| 678 |
-
label="Background Preset"
|
| 679 |
-
info="Choose a preset or upload custom image"
|
| 680 |
)
|
| 681 |
|
| 682 |
background_input = gr.Image(
|
| 683 |
-
label="Custom Background (
|
| 684 |
type="pil",
|
| 685 |
-
height=200
|
| 686 |
-
info="Upload image to override preset"
|
| 687 |
)
|
| 688 |
|
| 689 |
with gr.Accordion("π€ SAM2 Settings", open=True):
|
|
@@ -694,8 +691,7 @@ def create_professional_interface():
|
|
| 694 |
("Base (320MB) - Best Quality", "base")
|
| 695 |
],
|
| 696 |
value="small",
|
| 697 |
-
label="SAM2 Model Size"
|
| 698 |
-
info="Larger models = better segmentation but slower processing"
|
| 699 |
)
|
| 700 |
|
| 701 |
edge_smoothing = gr.Slider(
|
|
@@ -703,15 +699,13 @@ def create_professional_interface():
|
|
| 703 |
maximum=5,
|
| 704 |
value=1.5,
|
| 705 |
step=0.5,
|
| 706 |
-
label="Edge Smoothing"
|
| 707 |
-
info="Softens edges around subject (0 = sharp, 5 = very soft)"
|
| 708 |
)
|
| 709 |
|
| 710 |
with gr.Accordion("π MatAnyone Professional Settings", open=True):
|
| 711 |
use_matanyone = gr.Checkbox(
|
| 712 |
value=True,
|
| 713 |
-
label="Enable MatAnyone Professional Alpha Matting"
|
| 714 |
-
info="π CVPR 2025 - Best quality but slower processing"
|
| 715 |
)
|
| 716 |
|
| 717 |
gr.Markdown("""
|
|
@@ -811,4 +805,4 @@ def create_professional_interface():
|
|
| 811 |
share=False,
|
| 812 |
show_error=True,
|
| 813 |
quiet=False
|
| 814 |
-
)
|
|
|
|
| 666 |
gr.Markdown("### π€ Input Configuration")
|
| 667 |
|
| 668 |
video_input = gr.Video(
|
| 669 |
+
label="Upload Video (MP4, AVI, MOV, MKV, WebM - max 5 min)",
|
| 670 |
+
height=300
|
|
|
|
| 671 |
)
|
| 672 |
|
| 673 |
with gr.Tab("π¨ Background"):
|
| 674 |
background_preset = gr.Dropdown(
|
| 675 |
choices=preset_choices,
|
| 676 |
value="gradient:ocean",
|
| 677 |
+
label="Background Preset - Choose preset or upload custom image"
|
|
|
|
| 678 |
)
|
| 679 |
|
| 680 |
background_input = gr.Image(
|
| 681 |
+
label="Custom Background (Upload image to override preset)",
|
| 682 |
type="pil",
|
| 683 |
+
height=200
|
|
|
|
| 684 |
)
|
| 685 |
|
| 686 |
with gr.Accordion("π€ SAM2 Settings", open=True):
|
|
|
|
| 691 |
("Base (320MB) - Best Quality", "base")
|
| 692 |
],
|
| 693 |
value="small",
|
| 694 |
+
label="SAM2 Model Size - Larger models = better segmentation but slower"
|
|
|
|
| 695 |
)
|
| 696 |
|
| 697 |
edge_smoothing = gr.Slider(
|
|
|
|
| 699 |
maximum=5,
|
| 700 |
value=1.5,
|
| 701 |
step=0.5,
|
| 702 |
+
label="Edge Smoothing - Softens edges around subject (0=sharp, 5=very soft)"
|
|
|
|
| 703 |
)
|
| 704 |
|
| 705 |
with gr.Accordion("π MatAnyone Professional Settings", open=True):
|
| 706 |
use_matanyone = gr.Checkbox(
|
| 707 |
value=True,
|
| 708 |
+
label="Enable MatAnyone Professional Alpha Matting - CVPR 2025 best quality but slower"
|
|
|
|
| 709 |
)
|
| 710 |
|
| 711 |
gr.Markdown("""
|
|
|
|
| 805 |
share=False,
|
| 806 |
show_error=True,
|
| 807 |
quiet=False
|
| 808 |
+
)
|