Spaces:
Runtime error
Runtime error
File size: 866 Bytes
15bacf1 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | 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()
|