MeYourHint commited on
Commit
413244f
·
1 Parent(s): 54f4777
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -85,11 +85,14 @@ def generate(
85
  ):
86
  os.system(f'python gen_t2m.py --gpu_id 0 --seed {seed} --ext {uid} --repeat_times {repeat_times} --motion_length {motion_length} --text_prompt "{text}"')
87
  datas = []
 
 
88
  for n in range(repeat_times):
89
  data_unit = {
90
- "url": f"./generation/{uid}/animations/0/sample0_repeat{n}_len196_ik.mp4"
91
  }
92
  datas.append(data_unit)
 
93
  return datas
94
 
95
 
 
85
  ):
86
  os.system(f'python gen_t2m.py --gpu_id 0 --seed {seed} --ext {uid} --repeat_times {repeat_times} --motion_length {motion_length} --text_prompt "{text}"')
87
  datas = []
88
+ file_name = [name for name in os.listdir(f"./generation/{uid}/animations/0/") if name.endswith('_ik.mp4')][0]
89
+ motion_length = int(file_name.split('len')[-1].replace('_ik.mp4', ''))
90
  for n in range(repeat_times):
91
  data_unit = {
92
+ "url": f"./generation/{uid}/animations/0/sample0_repeat{n}_len{motion_length}_ik.mp4"
93
  }
94
  datas.append(data_unit)
95
+ print(datas)
96
  return datas
97
 
98