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

Upload hf_space_app.py with huggingface_hub

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