Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -68,8 +68,6 @@ def main():
|
|
68 |
device = "cuda"
|
69 |
else:
|
70 |
device = "cpu"
|
71 |
-
driven_audio_type = gr.Textbox(value="upload", visible=False)
|
72 |
-
reference_audio_type = gr.Textbox(value="upload", visible=False)
|
73 |
with gr.Blocks(analytics_enabled=False) as interface:
|
74 |
with gr.Row():
|
75 |
gr.HTML(
|
@@ -83,6 +81,8 @@ def main():
|
|
83 |
</div>
|
84 |
"""
|
85 |
)
|
|
|
|
|
86 |
with gr.Row():
|
87 |
with gr.Column(variant="panel"):
|
88 |
with gr.Tabs(elem_id="kdtalker_source_image"):
|
@@ -130,10 +130,10 @@ def main():
|
|
130 |
audio_path = example.get("audio", "")
|
131 |
image_path = example.get("image", "")
|
132 |
return [audio_path, image_path]
|
133 |
-
|
134 |
-
|
135 |
-
inputs=[
|
136 |
-
|
137 |
)
|
138 |
example_choice.change(set_upload, outputs=driven_audio_type)
|
139 |
|
|
|
68 |
device = "cuda"
|
69 |
else:
|
70 |
device = "cpu"
|
|
|
|
|
71 |
with gr.Blocks(analytics_enabled=False) as interface:
|
72 |
with gr.Row():
|
73 |
gr.HTML(
|
|
|
81 |
</div>
|
82 |
"""
|
83 |
)
|
84 |
+
driven_audio_type = gr.Textbox(value="upload", visible=False)
|
85 |
+
reference_audio_type = gr.Textbox(value="upload", visible=False)
|
86 |
with gr.Row():
|
87 |
with gr.Column(variant="panel"):
|
88 |
with gr.Tabs(elem_id="kdtalker_source_image"):
|
|
|
130 |
audio_path = example.get("audio", "")
|
131 |
image_path = example.get("image", "")
|
132 |
return [audio_path, image_path]
|
133 |
+
example_choice.change(
|
134 |
+
fn=load_example,
|
135 |
+
inputs=[example_choice],
|
136 |
+
outputs=[upload_driven_audio, source_image]
|
137 |
)
|
138 |
example_choice.change(set_upload, outputs=driven_audio_type)
|
139 |
|