Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -543,7 +543,7 @@ footer{display:none !important}
|
|
| 543 |
"""
|
| 544 |
|
| 545 |
with gr.Blocks(css=css) as interface:
|
| 546 |
-
gr.Markdown("#
|
| 547 |
gr.Markdown("### Face swap app based on insightface inswapper.")
|
| 548 |
with gr.Row():
|
| 549 |
with gr.Row():
|
|
@@ -561,7 +561,7 @@ with gr.Blocks(css=css) as interface:
|
|
| 561 |
value=25, label="Value", interactive=True, visible=False
|
| 562 |
)
|
| 563 |
|
| 564 |
-
with gr.Tab("
|
| 565 |
detect_condition_dropdown = gr.Dropdown(
|
| 566 |
detect_conditions,
|
| 567 |
label="Condition",
|
|
@@ -579,7 +579,7 @@ with gr.Blocks(css=css) as interface:
|
|
| 579 |
)
|
| 580 |
apply_detection_settings = gr.Button("Apply settings")
|
| 581 |
|
| 582 |
-
with gr.Tab("
|
| 583 |
output_directory = gr.Text(
|
| 584 |
label="Output Directory",
|
| 585 |
value=DEF_OUTPUT_PATH,
|
|
@@ -592,7 +592,7 @@ with gr.Blocks(css=css) as interface:
|
|
| 592 |
label="Keep output sequence", value=False, interactive=True
|
| 593 |
)
|
| 594 |
|
| 595 |
-
with gr.Tab("
|
| 596 |
face_scale = gr.Slider(
|
| 597 |
label="Face Scale",
|
| 598 |
minimum=0,
|
|
@@ -707,7 +707,7 @@ with gr.Blocks(css=css) as interface:
|
|
| 707 |
video_input = gr.Video(
|
| 708 |
label="Target Video", interactive=True
|
| 709 |
)
|
| 710 |
-
with gr.Accordion("
|
| 711 |
with gr.Column():
|
| 712 |
with gr.Row():
|
| 713 |
set_slider_range_btn = gr.Button(
|
|
@@ -754,7 +754,7 @@ with gr.Blocks(css=css) as interface:
|
|
| 754 |
info = gr.Markdown(value="...")
|
| 755 |
|
| 756 |
with gr.Row():
|
| 757 |
-
swap_button = gr.Button("
|
| 758 |
cancel_button = gr.Button("β Cancel")
|
| 759 |
|
| 760 |
preview_image = gr.Image(label="Output", interactive=False)
|
|
@@ -767,26 +767,11 @@ with gr.Blocks(css=css) as interface:
|
|
| 767 |
"π", interactive=False, visible=False
|
| 768 |
)
|
| 769 |
output_video_button = gr.Button(
|
| 770 |
-
"
|
| 771 |
)
|
| 772 |
|
| 773 |
-
|
| 774 |
-
|
| 775 |
-
gr.Markdown(
|
| 776 |
-
"### [π€ Sponsor](https://github.com/sponsors/harisreedhar)"
|
| 777 |
-
)
|
| 778 |
-
gr.Markdown(
|
| 779 |
-
"### [π¨βπ» Source code](https://github.com/harisreedhar/Swap-Mukham)"
|
| 780 |
-
)
|
| 781 |
-
gr.Markdown(
|
| 782 |
-
"### [β οΈ Disclaimer](https://github.com/harisreedhar/Swap-Mukham#disclaimer)"
|
| 783 |
-
)
|
| 784 |
-
gr.Markdown(
|
| 785 |
-
"### [π Run in Colab](https://colab.research.google.com/github/harisreedhar/Swap-Mukham/blob/main/swap_mukham_colab.ipynb)"
|
| 786 |
-
)
|
| 787 |
-
gr.Markdown(
|
| 788 |
-
"### [π€ Acknowledgements](https://github.com/harisreedhar/Swap-Mukham#acknowledgements)"
|
| 789 |
-
)
|
| 790 |
|
| 791 |
## ------------------------------ GRADIO EVENTS ------------------------------
|
| 792 |
|
|
|
|
| 543 |
"""
|
| 544 |
|
| 545 |
with gr.Blocks(css=css) as interface:
|
| 546 |
+
gr.Markdown("# π Swapper")
|
| 547 |
gr.Markdown("### Face swap app based on insightface inswapper.")
|
| 548 |
with gr.Row():
|
| 549 |
with gr.Row():
|
|
|
|
| 561 |
value=25, label="Value", interactive=True, visible=False
|
| 562 |
)
|
| 563 |
|
| 564 |
+
with gr.Tab("π Detection Settings"):
|
| 565 |
detect_condition_dropdown = gr.Dropdown(
|
| 566 |
detect_conditions,
|
| 567 |
label="Condition",
|
|
|
|
| 579 |
)
|
| 580 |
apply_detection_settings = gr.Button("Apply settings")
|
| 581 |
|
| 582 |
+
with gr.Tab("π§ Output Settings"):
|
| 583 |
output_directory = gr.Text(
|
| 584 |
label="Output Directory",
|
| 585 |
value=DEF_OUTPUT_PATH,
|
|
|
|
| 592 |
label="Keep output sequence", value=False, interactive=True
|
| 593 |
)
|
| 594 |
|
| 595 |
+
with gr.Tab("π¨ Other Settings"):
|
| 596 |
face_scale = gr.Slider(
|
| 597 |
label="Face Scale",
|
| 598 |
minimum=0,
|
|
|
|
| 707 |
video_input = gr.Video(
|
| 708 |
label="Target Video", interactive=True
|
| 709 |
)
|
| 710 |
+
with gr.Accordion("πͺ Trim video", open=False):
|
| 711 |
with gr.Column():
|
| 712 |
with gr.Row():
|
| 713 |
set_slider_range_btn = gr.Button(
|
|
|
|
| 754 |
info = gr.Markdown(value="...")
|
| 755 |
|
| 756 |
with gr.Row():
|
| 757 |
+
swap_button = gr.Button("π― Swap", variant="primary")
|
| 758 |
cancel_button = gr.Button("β Cancel")
|
| 759 |
|
| 760 |
preview_image = gr.Image(label="Output", interactive=False)
|
|
|
|
| 767 |
"π", interactive=False, visible=False
|
| 768 |
)
|
| 769 |
output_video_button = gr.Button(
|
| 770 |
+
"πΊ", interactive=False, visible=False
|
| 771 |
)
|
| 772 |
|
| 773 |
+
|
| 774 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 775 |
|
| 776 |
## ------------------------------ GRADIO EVENTS ------------------------------
|
| 777 |
|