robinwitch commited on
Commit
b8ddd5f
·
1 Parent(s): 0e27884
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -51,10 +51,10 @@ pipe = pipeline(
51
  "automatic-speech-recognition",
52
  model="openai/whisper-tiny.en",
53
  chunk_length_s=30,
54
- device=device,
55
  )
56
 
57
- @spaces.GPU()
58
  def run_pipeline(audio):
59
  return pipe(audio, batch_size=8)["text"]
60
 
@@ -333,12 +333,10 @@ class BaseTrainer(object):
333
  return result
334
 
335
 
336
- @spaces.GPU(duration=100)
337
  def _warp(args,model, batch_data,joints,joint_mask_upper,joint_mask_hands,joint_mask_lower,use_trans,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std):
338
  diffusion = create_gaussian_diffusion(use_ddim=args.use_ddim)
339
  args,model,vq_model_upper,vq_model_hands,vq_model_lower,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std,vqvae_latent_scale=_warp_create_cuda_model(args,model,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std)
340
-
341
-
342
  loaded_data = _warp_load_data(
343
  batch_data,joints,joint_mask_upper,joint_mask_hands,joint_mask_lower,args,use_trans,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std,vq_model_upper,vq_model_hands,vq_model_lower
344
  )
 
51
  "automatic-speech-recognition",
52
  model="openai/whisper-tiny.en",
53
  chunk_length_s=30,
54
+ device='cpu',
55
  )
56
 
57
+ # @spaces.GPU()
58
  def run_pipeline(audio):
59
  return pipe(audio, batch_size=8)["text"]
60
 
 
333
  return result
334
 
335
 
336
+ @spaces.GPU(duration=140)
337
  def _warp(args,model, batch_data,joints,joint_mask_upper,joint_mask_hands,joint_mask_lower,use_trans,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std):
338
  diffusion = create_gaussian_diffusion(use_ddim=args.use_ddim)
339
  args,model,vq_model_upper,vq_model_hands,vq_model_lower,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std,vqvae_latent_scale=_warp_create_cuda_model(args,model,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std)
 
 
340
  loaded_data = _warp_load_data(
341
  batch_data,joints,joint_mask_upper,joint_mask_hands,joint_mask_lower,args,use_trans,mean_upper,mean_hands,mean_lower,std_upper,std_hands,std_lower,trans_mean,trans_std,vq_model_upper,vq_model_hands,vq_model_lower
342
  )