daddyjin's picture
add app.py
38b3e82
raw
history blame
929 Bytes
import gradio as gr
from FONT.gradio_demo import FONT
def tfr(source_img, driving_audio):
tfg = FONT()
src_image_path = './FONT/test/image/ABOUT_00994.jpg'
driving_audio_path = './FONT/test/audio/00015.mp3'
video_path = tfg.test(source_image_path=src_image_path, driving_audio_path=driving_audio_path)
# print(video_path)
return video_path
tfr_demo = gr.Interface(fn=tfr, inputs=["image", "audio"], outputs="video",
examples=[["./example/images/ABOUT_00514.jpg", "./example/audios/6343252661930009508_00092.wav"],
["./example/images/ABOUT_00994.jpg", "./example/audios/6350921755403330389_00056.wav"]])
def greet(name):
return "Hello, " + name + "!"
fr_demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo = gr.TabbedInterface([tfr_demo, fr_demo], ["Talking Face Generation", "Face Reenactment"])
info = demo.launch()
print(info)