import os import gradio as gr import subprocess title = "DaGAN Demo" description = "reconstruction and animation demos for DaGAN" def inference(mode, img, video): os.makedirs('tmp', exist_ok=True) subprocess.run("echo 'hi'") """ os.system("python run.py --source_image {} --driving_video """ gr.Interface( inference, [ gr.Dropdown(["reconstruction", "animation"]), gr.inputs.Image(type="filepath", label="Source (only used if mode is reconstruction)"), gr.inputs.Image(type="mp4", label="Driving Video") ], outputs=None, title=title, description=description, theme="huggingface", allow_flagging=False).launch(debug=False,enable_queue=True)