File size: 569 Bytes
1f50dc9
 
6dd2bea
1f50dc9
 
 
9fd7dfb
6dd2bea
 
 
 
 
 
 
 
 
 
9fd7dfb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import subprocess
import os
import spaces

subprocess.run(["git","clone","https://github.com/ExponentialML/Text-To-Video-Finetuning.git"])
os.chdir("./Text-To-Video-Finetuning")
subprocess.run(["pip","install","-r","requirements.txt"])
with open ("app_svd.py","r+") as app:
    text = app.read()
    if not "spaces" in text:
      text = text.replace("def animate()","""@spaces.GPU
def animate""")
      text = text.replace("import math","""import math
import spaces""")
      app.write(text)
      app.truncate()
      app.seek(0)
subprocess.run("python","app_svd.py")