Spaces:
Running
on
Zero
Running
on
Zero
fix some small issue
Browse files
app.py
CHANGED
@@ -201,13 +201,13 @@ def test(source_image, driven_audio, preprocess='crop',
|
|
201 |
|
202 |
|
203 |
with gr.Blocks(analytics_enabled=False) as demo:
|
204 |
-
with gr.Row()
|
205 |
with gr.Column(variant='panel'):
|
206 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
207 |
with gr.TabItem('Source image'):
|
208 |
with gr.Row():
|
209 |
source_image = gr.Image(
|
210 |
-
label="Source image", source="upload", type="filepath", elem_id="img2img_image")
|
211 |
|
212 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
213 |
with gr.TabItem('Driving Methods'):
|
@@ -230,7 +230,7 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
230 |
|
231 |
with gr.Row():
|
232 |
ref_video = gr.Video(
|
233 |
-
label="Reference Video", source="upload", type="filepath", elem_id="vidref")
|
234 |
|
235 |
with gr.Column():
|
236 |
use_ref_video = gr.Checkbox(
|
@@ -278,7 +278,7 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
278 |
|
279 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
280 |
gen_video = gr.Video(
|
281 |
-
label="Generated video", format="mp4")
|
282 |
|
283 |
submit.click(
|
284 |
fn=test,
|
@@ -303,7 +303,7 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
303 |
)
|
304 |
|
305 |
with gr.Row():
|
306 |
-
examples
|
307 |
[
|
308 |
'examples/source_image/full_body_1.png',
|
309 |
'examples/driven_audio/bus_chinese.wav',
|
@@ -367,16 +367,14 @@ with gr.Blocks(analytics_enabled=False) as demo:
|
|
367 |
True,
|
368 |
True
|
369 |
],
|
370 |
-
]
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
fn=test,
|
380 |
-
cache_examples=os.getenv('SYSTEM') == 'spaces')
|
381 |
|
382 |
demo.launch(debug=True)
|
|
|
201 |
|
202 |
|
203 |
with gr.Blocks(analytics_enabled=False) as demo:
|
204 |
+
with gr.Row():
|
205 |
with gr.Column(variant='panel'):
|
206 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
207 |
with gr.TabItem('Source image'):
|
208 |
with gr.Row():
|
209 |
source_image = gr.Image(
|
210 |
+
label="Source image", source="upload", type="filepath", elem_id="img2img_image")
|
211 |
|
212 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
213 |
with gr.TabItem('Driving Methods'):
|
|
|
230 |
|
231 |
with gr.Row():
|
232 |
ref_video = gr.Video(
|
233 |
+
label="Reference Video", source="upload", type="filepath", elem_id="vidref")
|
234 |
|
235 |
with gr.Column():
|
236 |
use_ref_video = gr.Checkbox(
|
|
|
278 |
|
279 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
280 |
gen_video = gr.Video(
|
281 |
+
label="Generated video", format="mp4")
|
282 |
|
283 |
submit.click(
|
284 |
fn=test,
|
|
|
303 |
)
|
304 |
|
305 |
with gr.Row():
|
306 |
+
gr.Examples(examples=[
|
307 |
[
|
308 |
'examples/source_image/full_body_1.png',
|
309 |
'examples/driven_audio/bus_chinese.wav',
|
|
|
367 |
True,
|
368 |
True
|
369 |
],
|
370 |
+
],
|
371 |
+
inputs=[
|
372 |
+
source_image,
|
373 |
+
driven_audio,
|
374 |
+
preprocess_type,
|
375 |
+
is_still_mode,
|
376 |
+
enhancer],
|
377 |
+
outputs=[gen_video],
|
378 |
+
fn=test)
|
|
|
|
|
379 |
|
380 |
demo.launch(debug=True)
|