Spaces:
Sleeping
Sleeping
update gradio
Browse files- app.py +7 -7
- requirements.txt +4 -4
app.py
CHANGED
@@ -50,12 +50,12 @@ def sadtalker_demo():
|
|
50 |
<br/><b>Alternatively, try our GitHub <a href=https://github.com/Winfredy/SadTalker> code </a> on your own GPU. </b> <a style='display:inline-block' href="https://github.com/Winfredy/SadTalker"><img src="https://img.shields.io/github/stars/Winfredy/SadTalker?style=social"/></a> \
|
51 |
""")
|
52 |
|
53 |
-
with gr.Row()
|
54 |
with gr.Column(variant='panel'):
|
55 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
56 |
with gr.TabItem('Source image'):
|
57 |
with gr.Row():
|
58 |
-
source_image = gr.Image(label="Source image",
|
59 |
|
60 |
|
61 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
@@ -63,8 +63,8 @@ def sadtalker_demo():
|
|
63 |
gr.Markdown("Possible driving combinations: <br> 1. Audio only 2. Audio/IDLE Mode + Ref Video(pose, blink, pose+blink) 3. IDLE Mode only 4. Ref Video only (all) ")
|
64 |
|
65 |
with gr.Row():
|
66 |
-
driven_audio = gr.Audio(label="Input audio"
|
67 |
-
driven_audio_no = gr.Audio(label="Use IDLE mode, no audio is required",
|
68 |
|
69 |
with gr.Column():
|
70 |
use_idle_mode = gr.Checkbox(label="Use Idle Animation")
|
@@ -72,7 +72,7 @@ def sadtalker_demo():
|
|
72 |
use_idle_mode.change(toggle_audio_file, inputs=use_idle_mode, outputs=[driven_audio, driven_audio_no]) # todo
|
73 |
|
74 |
with gr.Row():
|
75 |
-
ref_video = gr.Video(label="Reference Video",
|
76 |
|
77 |
with gr.Column():
|
78 |
use_ref_video = gr.Checkbox(label="Use Reference Video")
|
@@ -108,7 +108,7 @@ def sadtalker_demo():
|
|
108 |
submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary')
|
109 |
|
110 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
111 |
-
gen_video = gr.Video(label="Generated video", format="mp4")
|
112 |
|
113 |
|
114 |
|
@@ -218,6 +218,6 @@ if __name__ == "__main__":
|
|
218 |
|
219 |
demo = sadtalker_demo()
|
220 |
demo.queue(max_size=10, api_open=True)
|
221 |
-
demo.launch(debug=True)
|
222 |
|
223 |
|
|
|
50 |
<br/><b>Alternatively, try our GitHub <a href=https://github.com/Winfredy/SadTalker> code </a> on your own GPU. </b> <a style='display:inline-block' href="https://github.com/Winfredy/SadTalker"><img src="https://img.shields.io/github/stars/Winfredy/SadTalker?style=social"/></a> \
|
51 |
""")
|
52 |
|
53 |
+
with gr.Row():
|
54 |
with gr.Column(variant='panel'):
|
55 |
with gr.Tabs(elem_id="sadtalker_source_image"):
|
56 |
with gr.TabItem('Source image'):
|
57 |
with gr.Row():
|
58 |
+
source_image = gr.Image(label="Source image", elem_id="img2img_image")
|
59 |
|
60 |
|
61 |
with gr.Tabs(elem_id="sadtalker_driven_audio"):
|
|
|
63 |
gr.Markdown("Possible driving combinations: <br> 1. Audio only 2. Audio/IDLE Mode + Ref Video(pose, blink, pose+blink) 3. IDLE Mode only 4. Ref Video only (all) ")
|
64 |
|
65 |
with gr.Row():
|
66 |
+
driven_audio = gr.Audio(label="Input audio")
|
67 |
+
driven_audio_no = gr.Audio(label="Use IDLE mode, no audio is required", visible=False)
|
68 |
|
69 |
with gr.Column():
|
70 |
use_idle_mode = gr.Checkbox(label="Use Idle Animation")
|
|
|
72 |
use_idle_mode.change(toggle_audio_file, inputs=use_idle_mode, outputs=[driven_audio, driven_audio_no]) # todo
|
73 |
|
74 |
with gr.Row():
|
75 |
+
ref_video = gr.Video(label="Reference Video", elem_id="vidref")
|
76 |
|
77 |
with gr.Column():
|
78 |
use_ref_video = gr.Checkbox(label="Use Reference Video")
|
|
|
108 |
submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary')
|
109 |
|
110 |
with gr.Tabs(elem_id="sadtalker_genearted"):
|
111 |
+
gen_video = gr.Video(label="Generated video", format="mp4")
|
112 |
|
113 |
|
114 |
|
|
|
218 |
|
219 |
demo = sadtalker_demo()
|
220 |
demo.queue(max_size=10, api_open=True)
|
221 |
+
demo.launch(debug=True, enable_queue=False)
|
222 |
|
223 |
|
requirements.txt
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
-
torch==
|
2 |
-
torchvision==0.
|
3 |
-
torchaudio==0.
|
4 |
numpy==1.23.5
|
5 |
-
face_alignment==1.
|
6 |
imageio==2.19.3
|
7 |
imageio-ffmpeg==0.4.7
|
8 |
librosa==0.8.0
|
|
|
1 |
+
torch==2.0.1
|
2 |
+
torchvision==0.15.2
|
3 |
+
torchaudio==2.0.2
|
4 |
numpy==1.23.5
|
5 |
+
face_alignment==1.4.1
|
6 |
imageio==2.19.3
|
7 |
imageio-ffmpeg==0.4.7
|
8 |
librosa==0.8.0
|