laaalaaxwarlordx commited on
Commit
e1888d2
·
verified ·
1 Parent(s): b692279

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +2 -5
app.py CHANGED
@@ -26,11 +26,8 @@ if not os.path.exists(WAV2LIP_DIR):
26
  os.makedirs(f"{WAV2LIP_DIR}/face_detection/detection/sfd", exist_ok=True)
27
 
28
  print("Downloading checkpoints...")
29
- hf_hub_download(repo_id="Kedreamix/Digital-Human-Weights", filename="wav2lip.pth", local_dir=f"{WAV2LIP_DIR}/checkpoints")
30
- hf_hub_download(repo_id="Kedreamix/Digital-Human-Weights", filename="s3fd-619a316812.pth", local_dir=f"{WAV2LIP_DIR}/face_detection/detection/sfd")
31
- # Rename s3fd weights to the name Wav2Lip expects
32
- if os.path.exists(f"{WAV2LIP_DIR}/face_detection/detection/sfd/s3fd-619a316812.pth"):
33
- os.rename(f"{WAV2LIP_DIR}/face_detection/detection/sfd/s3fd-619a316812.pth", f"{WAV2LIP_DIR}/face_detection/detection/sfd/s3fd.pth")
34
 
35
  # Add to path
36
  if WAV2LIP_DIR not in sys.path:
 
26
  os.makedirs(f"{WAV2LIP_DIR}/face_detection/detection/sfd", exist_ok=True)
27
 
28
  print("Downloading checkpoints...")
29
+ hf_hub_download(repo_id="camenduru/Wav2Lip", filename="checkpoints/wav2lip.pth", local_dir=WAV2LIP_DIR)
30
+ hf_hub_download(repo_id="camenduru/Wav2Lip", filename="face_detection/detection/sfd/s3fd.pth", local_dir=WAV2LIP_DIR)
 
 
 
31
 
32
  # Add to path
33
  if WAV2LIP_DIR not in sys.path: