Spaces:
Running
on
T4
Running
on
T4
Update app.py
Browse files
app.py
CHANGED
@@ -141,7 +141,7 @@ def expand_mask(mask, kernel_size):
|
|
141 |
return Image.fromarray(expanded_mask_array)
|
142 |
|
143 |
|
144 |
-
def crop_face_to_square(image_rgb, padding_ratio=0.2, height_multiplier=1.
|
145 |
"""
|
146 |
Detect the face and crop a rectangular region that includes more of the body below the face.
|
147 |
Instead of centering around the face, we start near the face region and extend downward.
|
@@ -703,7 +703,7 @@ with gr.Blocks(css=css) as demo:
|
|
703 |
background_option = gr.Radio(choices=["Preserve Background", "Don't Preserve Background"], label="Background Option", value="Preserve Background")
|
704 |
generate_image_button = gr.Button("Generate Image")
|
705 |
gr.Examples(
|
706 |
-
examples=["example1.jpg", "example2.jpg", "example3.jpg"
|
707 |
inputs=image_input,
|
708 |
label="Example Images"
|
709 |
)
|
@@ -725,7 +725,7 @@ with gr.Blocks(css=css) as demo:
|
|
725 |
video_input = gr.Video(label="Upload a driving video (MP4 format)")
|
726 |
generate_video_button = gr.Button("Generate Video")
|
727 |
gr.Examples(
|
728 |
-
examples=["video1.mp4", "
|
729 |
inputs=video_input,
|
730 |
label="Example Videos"
|
731 |
)
|
|
|
141 |
return Image.fromarray(expanded_mask_array)
|
142 |
|
143 |
|
144 |
+
def crop_face_to_square(image_rgb, padding_ratio=0.2, height_multiplier=1.2):
|
145 |
"""
|
146 |
Detect the face and crop a rectangular region that includes more of the body below the face.
|
147 |
Instead of centering around the face, we start near the face region and extend downward.
|
|
|
703 |
background_option = gr.Radio(choices=["Preserve Background", "Don't Preserve Background"], label="Background Option", value="Preserve Background")
|
704 |
generate_image_button = gr.Button("Generate Image")
|
705 |
gr.Examples(
|
706 |
+
examples=["example1.jpg", "example2.jpg", "example3.jpg"],
|
707 |
inputs=image_input,
|
708 |
label="Example Images"
|
709 |
)
|
|
|
725 |
video_input = gr.Video(label="Upload a driving video (MP4 format)")
|
726 |
generate_video_button = gr.Button("Generate Video")
|
727 |
gr.Examples(
|
728 |
+
examples=["video1.mp4", "video3.mp4", "video4.mp4"],
|
729 |
inputs=video_input,
|
730 |
label="Example Videos"
|
731 |
)
|