INNER CODE UNIT · Python
predict
jdh-algo/JoyHallo · scripts/app.py:673
def predict(image, audio, pose_weight, face_weight, lip_weight, face_expand_ratio, progress=gr.Progress(track_tqdm=True)):
"""
Create a gradio interface with the configs.
"""
_ = progress
config = {
'ref_img_path': image,
'audio_path': audio,
'pose_weight': pose_weight,
'face_weight': face_weight,
'lip_weight': lip_weight,
'face_expand_ratio': face_expand_ratio,
'config': 'configs/inference/inference.yaml',
'checkpoint': None,
'output': "output.mp4"
}
global cfg, image_processor, audio_processor, pipeline, audioproj, save_dir, global_step, clip_length
for key, value in config.items():