Update gradio_app.py
Browse files- gradio_app.py +5 -3
gradio_app.py
CHANGED
|
@@ -377,9 +377,11 @@ class Inferencer(object):
|
|
| 377 |
os.remove(new_audio_path)
|
| 378 |
|
| 379 |
def gradio_infer(source_image, driven_audio):
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
|
|
|
|
|
|
| 383 |
Infer = Inferencer()
|
| 384 |
Infer.generate_with_audio_img(source_image, driven_audio, output_path)
|
| 385 |
|
|
|
|
| 377 |
os.remove(new_audio_path)
|
| 378 |
|
| 379 |
def gradio_infer(source_image, driven_audio):
|
| 380 |
+
|
| 381 |
+
import tempfile
|
| 382 |
+
temp_dir = tempfile.mkdtemp()
|
| 383 |
+
output_path = f"{temp_dir}/output.mp4"
|
| 384 |
+
|
| 385 |
Infer = Inferencer()
|
| 386 |
Infer.generate_with_audio_img(source_image, driven_audio, output_path)
|
| 387 |
|