Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -2,10 +2,10 @@ import subprocess
|
|
2 |
import os
|
3 |
import spaces
|
4 |
|
5 |
-
subprocess.run(["git","clone","https://github.com/
|
6 |
-
os.chdir("./
|
7 |
subprocess.run(["pip","install","-r","requirements.txt"])
|
8 |
-
with open ("app_svd.py","r+") as app:
|
9 |
text = app.read()
|
10 |
if not "spaces" in text:
|
11 |
text = text.replace("def animate()","""@spaces.GPU
|
@@ -15,4 +15,4 @@ import spaces""")
|
|
15 |
app.write(text)
|
16 |
app.truncate()
|
17 |
app.seek(0)
|
18 |
-
subprocess.run("python","app_svd.py")
|
|
|
2 |
import os
|
3 |
import spaces
|
4 |
|
5 |
+
subprocess.run(["git","clone","https://github.com/alibaba/animate-anything.git"])
|
6 |
+
os.chdir("./animate-anything")
|
7 |
subprocess.run(["pip","install","-r","requirements.txt"])
|
8 |
+
with open ("/home/user/app/animate-anything/app_svd.py","r+") as app:
|
9 |
text = app.read()
|
10 |
if not "spaces" in text:
|
11 |
text = text.replace("def animate()","""@spaces.GPU
|
|
|
15 |
app.write(text)
|
16 |
app.truncate()
|
17 |
app.seek(0)
|
18 |
+
subprocess.run("python","app_svd.py","--config", "example/train_svd_v2v.yaml","pretrained_model_path=/home/user/app/animate_anything_svd_v1.01.tar")
|