fffiloni commited on
Commit
cd10782
·
verified ·
1 Parent(s): 00c6ce0

Update gradio_app.py

Browse files
Files changed (1) hide show
  1. 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
- output_path = "results/output.mp4"
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