Spaces:
Runtime error
Runtime error
Download app.py from Hammerhands/lipsync: direct link, hf CLI and curl.
- Browser
- Download file 866 Bytes
-
https://huggingface.co/spaces/Hammerhands/lipsync/resolve/main/app.py
- Command line
-
hf download hf://spaces/Hammerhands/lipsync/app.py
-
curl -L -o app.py https://huggingface.co/spaces/Hammerhands/lipsync/resolve/main/app.py
866 Bytes
| import os | |
| import subprocess | |
| import sys | |
| REPO = "https://github.com/TridentIntelFree/Lipsync-.git" | |
| BRANCHES = ["claude/lipsync-speech-inference-k649jo", "main"] | |
| CHECKOUT = "/home/user/app/_lipsync" | |
| if not os.path.isdir(CHECKOUT): | |
| for branch in BRANCHES: | |
| done = subprocess.run( | |
| ["git", "clone", "--depth", "1", "--branch", branch, REPO, CHECKOUT], | |
| capture_output=True, | |
| text=True, | |
| ) | |
| if done.returncode == 0: | |
| print(f"Cloned {REPO} @ {branch}") | |
| break | |
| else: | |
| raise SystemExit(f"Could not clone {REPO} from any of {BRANCHES}") | |
| sys.path.insert(0, CHECKOUT) | |
| os.environ.setdefault( | |
| "LIPSYNC_CACHE", "/data/lipsync" if os.path.isdir("/data") else "/tmp/lipsync-cache" | |
| ) | |
| import app as lipsync_app | |
| demo = lipsync_app.build() | |
| if __name__ == "__main__": | |
| demo.launch() | |