Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -47,17 +47,19 @@ if not os.path.exists("SadTalker"):
|
|
| 47 |
# Télécharger les checkpoints nécessaires
|
| 48 |
os.makedirs("SadTalker/checkpoints", exist_ok=True)
|
| 49 |
checkpoints = {
|
| 50 |
-
"
|
| 51 |
"GFPGANv1.4.pth": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/GFPGANv1.4.pth",
|
| 52 |
"epoch_20.pth": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/epoch_20.pth",
|
| 53 |
"mapping_00229-model.pth.tar": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/mapping_00229-model.pth.tar",
|
| 54 |
"shape_predictor_68_face_landmarks.dat": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/shape_predictor_68_face_landmarks.dat",
|
| 55 |
}
|
|
|
|
| 56 |
for name, url in checkpoints.items():
|
| 57 |
dest = f"SadTalker/checkpoints/{name}"
|
| 58 |
if not os.path.exists(dest):
|
| 59 |
print(f"⬇️ Téléchargement {name}...")
|
| 60 |
subprocess.run(["wget", "-q", "-O", dest, url], check=True)
|
|
|
|
| 61 |
print("✅ SadTalker prêt à l’emploi.")
|
| 62 |
|
| 63 |
# ============================================================
|
|
|
|
| 47 |
# Télécharger les checkpoints nécessaires
|
| 48 |
os.makedirs("SadTalker/checkpoints", exist_ok=True)
|
| 49 |
checkpoints = {
|
| 50 |
+
"audio2exp.pt": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/audio2exp.pt",
|
| 51 |
"GFPGANv1.4.pth": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/GFPGANv1.4.pth",
|
| 52 |
"epoch_20.pth": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/epoch_20.pth",
|
| 53 |
"mapping_00229-model.pth.tar": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/mapping_00229-model.pth.tar",
|
| 54 |
"shape_predictor_68_face_landmarks.dat": "https://huggingface.co/OpenTalker/SadTalker/resolve/main/checkpoints/shape_predictor_68_face_landmarks.dat",
|
| 55 |
}
|
| 56 |
+
|
| 57 |
for name, url in checkpoints.items():
|
| 58 |
dest = f"SadTalker/checkpoints/{name}"
|
| 59 |
if not os.path.exists(dest):
|
| 60 |
print(f"⬇️ Téléchargement {name}...")
|
| 61 |
subprocess.run(["wget", "-q", "-O", dest, url], check=True)
|
| 62 |
+
|
| 63 |
print("✅ SadTalker prêt à l’emploi.")
|
| 64 |
|
| 65 |
# ============================================================
|