Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,11 +36,10 @@ def generate(video, audio, checkpoint, no_smooth, resize_factor, pad_top, pad_bo
|
|
36 |
"--face", video_path,
|
37 |
"--audio", audio_path,
|
38 |
"--outfile", output_path,
|
39 |
-
"--resize_factor", "
|
40 |
"--face_det_batch_size", "32",
|
41 |
"--wav2lip_batch_size", "256",
|
42 |
-
"--
|
43 |
-
"--fps", "15",
|
44 |
|
45 |
"--pads", str(pad_top), str(pad_bottom), str(pad_left), str(pad_right)
|
46 |
]
|
@@ -76,13 +75,13 @@ with gr.Blocks() as ui:
|
|
76 |
video = gr.File(label="Видео или Изображение", type="filepath")
|
77 |
audio = gr.File(label="Аудио", type="filepath")
|
78 |
with gr.Column():
|
79 |
-
checkpoint = gr.Radio(["wav2lip", "wav2lip_gan"], label="Чекпойнт", value="wav2lip_gan")
|
80 |
no_smooth = gr.Checkbox(label="Без сглаживания", value=False)
|
81 |
-
resize_factor = gr.Slider(minimum=1, maximum=4, step=1, label="Фактор изменения размера", value=
|
82 |
with gr.Row():
|
83 |
with gr.Column():
|
84 |
pad_top = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ сверху")
|
85 |
-
pad_bottom = gr.Slider(minimum=0, maximum=50, step=1, value=10, label="Отступ снизу
|
86 |
pad_left = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ слева")
|
87 |
pad_right = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ справа")
|
88 |
save_as_video = gr.Checkbox(label="Сохранять как видео", value=True) # Новый элемент управления
|
|
|
36 |
"--face", video_path,
|
37 |
"--audio", audio_path,
|
38 |
"--outfile", output_path,
|
39 |
+
"--resize_factor", "2",
|
40 |
"--face_det_batch_size", "32",
|
41 |
"--wav2lip_batch_size", "256",
|
42 |
+
"--fps", "30",
|
|
|
43 |
|
44 |
"--pads", str(pad_top), str(pad_bottom), str(pad_left), str(pad_right)
|
45 |
]
|
|
|
75 |
video = gr.File(label="Видео или Изображение", type="filepath")
|
76 |
audio = gr.File(label="Аудио", type="filepath")
|
77 |
with gr.Column():
|
78 |
+
checkpoint = gr.Radio(["wav2lip", "wav2lip_gan"], label="Чекпойнт", value="wav2lip_gan", visible=False)
|
79 |
no_smooth = gr.Checkbox(label="Без сглаживания", value=False)
|
80 |
+
resize_factor = gr.Slider(minimum=1, maximum=4, step=1, label="Фактор изменения размера", value=2)
|
81 |
with gr.Row():
|
82 |
with gr.Column():
|
83 |
pad_top = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ сверху")
|
84 |
+
pad_bottom = gr.Slider(minimum=0, maximum=50, step=1, value=10, label="Отступ снизу")
|
85 |
pad_left = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ слева")
|
86 |
pad_right = gr.Slider(minimum=0, maximum=50, step=1, value=0, label="Отступ справа")
|
87 |
save_as_video = gr.Checkbox(label="Сохранять как видео", value=True) # Новый элемент управления
|