pragnakalp commited on
Commit
2995688
1 Parent(s): 9e02b18

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -33,7 +33,9 @@ def calculate(image_in, audio_in):
33
  # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
34
  os.system(f"cd /content/one-shot-talking-face && python3 -B test_script.py --img_path /content/image.png --audio_path /content/audio.wav --phoneme_path /content/test.json --save_dir /content/train")
35
  return "/content/train/image_audio.mp4"
36
-
 
 
37
  def run():
38
  with block:
39
 
@@ -47,7 +49,7 @@ def run():
47
  btn = gr.Button("Generate")
48
 
49
 
50
- btn.click(calculate, inputs=[image_in, audio_in], outputs=[video_out])
51
  block.queue()
52
  block.launch(server_name="0.0.0.0", server_port=7860)
53
 
 
33
  # device = torch.device('cuda' if torch.cuda.is_available() else 'cpu')
34
  os.system(f"cd /content/one-shot-talking-face && python3 -B test_script.py --img_path /content/image.png --audio_path /content/audio.wav --phoneme_path /content/test.json --save_dir /content/train")
35
  return "/content/train/image_audio.mp4"
36
+
37
+ def one_shot(image_in,audio_in):
38
+ return calculate(image_in,audio_in)
39
  def run():
40
  with block:
41
 
 
49
  btn = gr.Button("Generate")
50
 
51
 
52
+ btn.click(one_shot, inputs=[image_in, audio_in], outputs=[video_out])
53
  block.queue()
54
  block.launch(server_name="0.0.0.0", server_port=7860)
55