| import subprocess | |
| import os | |
| import sys | |
| if not os.path.exists("src/Wav2Lip"): | |
| subprocess.run( | |
| ["git", "clone", "https://huggingface.co/camenduru/Wav2Lip", "src/Wav2Lip"], | |
| check=True | |
| ) | |
| os.makedirs("src/Wav2Lip/checkpoints", exist_ok=True) | |
| if not os.path.exists("src/Wav2Lip/checkpoints/wav2lip.pth"): | |
| subprocess.run([ | |
| "wget", "-O", "src/Wav2Lip/checkpoints/wav2lip.pth", | |
| "https://huggingface.co/camenduru/Wav2Lip/resolve/main/wav2lip.pth" | |
| ], check=True) | |
| sys.path.append(os.path.abspath("src/Wav2Lip")) | |