Spaces:
Runtime error

lipsync / app.py
Hammerhands's picture
Create app.py
15bacf1 verified
Raw History Blame Contribute Delete
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()