Yzy00518 commited on
Commit
f632f68
·
1 Parent(s): a0306e5

Upload src/app/test.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. src/app/test.py +41 -0
src/app/test.py ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from setup_models import *
2
+ from pipeline import pipeline
3
+
4
+ import os
5
+ import pickle
6
+ import sys
7
+
8
+ text = [
9
+ 'The person is jogging with their upper body.',
10
+ 'Replace a person with a proud look using their upper body.',
11
+ 'The person is playing violin.',
12
+ ]
13
+
14
+
15
+ task = [
16
+ ['regen', 'regen'],
17
+ ['style_transfer', 'style_transfer'],
18
+ ['regen', 'regen'],
19
+ ]
20
+
21
+ progress_indicator = [
22
+ [0.2, 0.5],
23
+ [0.2, 0.75],
24
+ [0.5, 0.5],
25
+ ]
26
+
27
+ with open('/home/ziye/cvpr/motion_editing/app/input/000135.pkl', 'rb') as f:
28
+ motion = pickle.load(f)
29
+
30
+
31
+ data = {
32
+ 'source': motion,
33
+ 'task': task,
34
+ 'text': text,
35
+ 'prog_ind': progress_indicator,
36
+ 'All_one_model': False,
37
+ 'model_type': task,
38
+ }
39
+ device = torch.device('cuda')
40
+
41
+ pipeline(data, models, device ,diffuser, SEQLEN=16, smplx_pth='/home/ziye/cvpr/motion_editing/app/deps/smplx')