Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,16 +3,8 @@ import os
|
|
3 |
import OpenGL.GL as gl
|
4 |
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
5 |
sys.argv = ['VQ-Trans/GPT_eval_multi.py']
|
6 |
-
os.umask(0)
|
7 |
-
os.makedirs('output', exist_ok=True)
|
8 |
os.chdir('VQ-Trans')
|
9 |
-
|
10 |
-
# os.system('gdown --fuzzy https://drive.google.com/file/d/1chKRmW2vNX5Lz6dPO45WY1qVNUkoJJ5D/view')
|
11 |
-
# os.system('gdown --fuzzy https://drive.google.com/file/d/1cgUVeGwPU7PzTDx20CAijt18fNhtnOPq/view')
|
12 |
-
# os.system('gdown --fuzzy https://drive.google.com/file/d/1o7RTDQcToJjTm9_mNWTyzvZvjTWpZfug/view -O checkpoints/')
|
13 |
-
# os.system('gdown --fuzzy https://drive.google.com/file/d/1tX79xk0fflp07EZ660Xz1RAFE33iEyJR/view -O checkpoints/')
|
14 |
-
os.system('unzip home/user/app/VQ-Trans/checkpoints/t2m.zip')
|
15 |
-
os.system('unzip home/user/app/VQ-Trans/checkpoints/kit.zip')
|
16 |
sys.path.append('/home/user/app/VQ-Trans')
|
17 |
|
18 |
import options.option_transformer as option_trans
|
@@ -100,8 +92,8 @@ ckpt = torch.load(args.resume_trans, map_location='cpu')
|
|
100 |
trans_encoder.load_state_dict(ckpt['trans'], strict=True)
|
101 |
trans_encoder.eval()
|
102 |
|
103 |
-
mean = torch.from_numpy(np.load('
|
104 |
-
std = torch.from_numpy(np.load('
|
105 |
|
106 |
if is_cuda:
|
107 |
net.cuda()
|
|
|
3 |
import OpenGL.GL as gl
|
4 |
os.environ["PYOPENGL_PLATFORM"] = "egl"
|
5 |
sys.argv = ['VQ-Trans/GPT_eval_multi.py']
|
|
|
|
|
6 |
os.chdir('VQ-Trans')
|
7 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
8 |
sys.path.append('/home/user/app/VQ-Trans')
|
9 |
|
10 |
import options.option_transformer as option_trans
|
|
|
92 |
trans_encoder.load_state_dict(ckpt['trans'], strict=True)
|
93 |
trans_encoder.eval()
|
94 |
|
95 |
+
mean = torch.from_numpy(np.load(f'{model_path}/meta/mean.npy'))
|
96 |
+
std = torch.from_numpy(np.load(f'{model_path}/meta/std.npy'))
|
97 |
|
98 |
if is_cuda:
|
99 |
net.cuda()
|