Commit
·
2c79431
1
Parent(s):
776c733
Update app.py
Browse files
app.py
CHANGED
@@ -44,7 +44,7 @@ def calculate(image_in, audio_in):
|
|
44 |
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")
|
45 |
return "/content/train/image_audio.mp4"
|
46 |
|
47 |
-
def one_shot(image_in,
|
48 |
if gender == "Female":
|
49 |
tts = gTTS(input_text)
|
50 |
with tempfile.NamedTemporaryFile(suffix='.mp3', delete=False) as f:
|
@@ -69,7 +69,7 @@ def run():
|
|
69 |
btn = gr.Button("Generate")
|
70 |
|
71 |
|
72 |
-
btn.click(one_shot, inputs=[image_in,
|
73 |
block.queue()
|
74 |
block.launch(server_name="0.0.0.0", server_port=7860)
|
75 |
|
|
|
44 |
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")
|
45 |
return "/content/train/image_audio.mp4"
|
46 |
|
47 |
+
def one_shot(image_in,input_text,gender):
|
48 |
if gender == "Female":
|
49 |
tts = gTTS(input_text)
|
50 |
with tempfile.NamedTemporaryFile(suffix='.mp3', delete=False) as f:
|
|
|
69 |
btn = gr.Button("Generate")
|
70 |
|
71 |
|
72 |
+
btn.click(one_shot, inputs=[image_in,input_text,gender], outputs=[video_out])
|
73 |
block.queue()
|
74 |
block.launch(server_name="0.0.0.0", server_port=7860)
|
75 |
|