Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gradio compatiblity #857

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions app_sadtalker.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,17 @@ def sadtalker_demo(checkpoint_path='checkpoints', config_path='src/config', warp
<a style='font-size:18px;color: #efefef' href='https://sadtalker.github.io'>Homepage</a> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<a style='font-size:18px;color: #efefef' href='https://github.com/Winfredy/SadTalker'> Github </div>")

with gr.Row().style(equal_height=False):
with gr.Row(equal_height=False):
with gr.Column(variant='panel'):
with gr.Tabs(elem_id="sadtalker_source_image"):
with gr.TabItem('Upload image'):
with gr.Row():
source_image = gr.Image(label="Source image", source="upload", type="filepath", elem_id="img2img_image").style(width=512)
source_image = gr.Image(label="Source image", sources="upload", type="filepath", elem_id="img2img_image", width=512)

with gr.Tabs(elem_id="sadtalker_driven_audio"):
with gr.TabItem('Upload OR TTS'):
with gr.Column(variant='panel'):
driven_audio = gr.Audio(label="Input audio", source="upload", type="filepath")
driven_audio = gr.Audio(label="Input audio", sources="upload", type="filepath")

if sys.platform != 'win32' and not in_webui:
from src.utils.text2speech import TTSTalker
Expand All @@ -68,7 +68,7 @@ def sadtalker_demo(checkpoint_path='checkpoints', config_path='src/config', warp
submit = gr.Button('Generate', elem_id="sadtalker_generate", variant='primary')

with gr.Tabs(elem_id="sadtalker_genearted"):
gen_video = gr.Video(label="Generated video", format="mp4").style(width=256)
gen_video = gr.Video(label="Generated video", format="mp4", width=256)

if warpfn:
submit.click(
Expand Down