Spaces:
Runtime error
Runtime error
Ahsen Khaliq
commited on
Commit
•
c163f4e
1
Parent(s):
1596c3b
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,7 @@ from pathlib import Path
|
|
8 |
module = hub.Module(name="wav2lip")
|
9 |
|
10 |
def inference(image,audio):
|
11 |
-
face_input_path = image
|
12 |
audio_input_path = audio
|
13 |
module.wav2lip_transfer(face=face_input_path, audio=audio_input_path, output_dir='./transfer_result/', use_gpu=False)
|
14 |
return './transfer_result/'+Path(image.name).stem+".mp4"
|
@@ -20,6 +20,6 @@ article = "<p style='text-align: center'><a href='https://github.com/jantic/DeOl
|
|
20 |
|
21 |
examples=[['lunch.jpeg']]
|
22 |
|
23 |
-
iface = gr.Interface(inference, inputs=gr.inputs.
|
24 |
outputs=gr.outputs.Image(type="file"),examples=examples,enable_queue=True,title=title,article=article,description=description)
|
25 |
iface.launch()
|
|
|
8 |
module = hub.Module(name="wav2lip")
|
9 |
|
10 |
def inference(image,audio):
|
11 |
+
face_input_path = image
|
12 |
audio_input_path = audio
|
13 |
module.wav2lip_transfer(face=face_input_path, audio=audio_input_path, output_dir='./transfer_result/', use_gpu=False)
|
14 |
return './transfer_result/'+Path(image.name).stem+".mp4"
|
|
|
20 |
|
21 |
examples=[['lunch.jpeg']]
|
22 |
|
23 |
+
iface = gr.Interface(inference, [gr.inputs.Image(type="filepath"),gr.inputs.Audio(type="filepath")],
|
24 |
outputs=gr.outputs.Image(type="file"),examples=examples,enable_queue=True,title=title,article=article,description=description)
|
25 |
iface.launch()
|