H-Liu1997 commited on
Commit
00b061d
1 Parent(s): 60853ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -336,10 +336,8 @@ def test_fn(model, device, iteration, candidate_json_path, test_path, cfg, audio
336
  audio_low = model_out_candidates["audio_low"]
337
  # audio_high = model_out_candidates["audio_high_weight"]
338
  audio_high = model_out_candidates["audio_cls"].unsqueeze(0).repeat(1, audio_low.shape[1], 1)
339
-
340
- gap = target_length - np.concatenate(audio_low_list, axis=0).shape[1]
341
- audio_low = F.normalize(audio_low, dim=2)[0][:gap].cpu().numpy()
342
- audio_high = F.normalize(audio_high, dim=2)[0][:gap].cpu().numpy()
343
  audio_low_list.append(audio_low)
344
  audio_high_list.append(audio_high)
345
 
@@ -671,7 +669,7 @@ def make_demo():
671
  <br>
672
  News:
673
  <br>
674
- [10/15]: Add watermark, fix bugs on custom character by downgrades to py3.9
675
  <br>
676
  [10/14]: Hugging face supports free L40S GPU for this project now!
677
  </div>
 
336
  audio_low = model_out_candidates["audio_low"]
337
  # audio_high = model_out_candidates["audio_high_weight"]
338
  audio_high = model_out_candidates["audio_cls"].unsqueeze(0).repeat(1, audio_low.shape[1], 1)
339
+ audio_low = F.normalize(audio_low, dim=2)[0].cpu().numpy()
340
+ audio_high = F.normalize(audio_high, dim=2)[0].cpu().numpy()
 
 
341
  audio_low_list.append(audio_low)
342
  audio_high_list.append(audio_high)
343
 
 
669
  <br>
670
  News:
671
  <br>
672
+ [10/15]: Add watermark, fix bugs on custom character by downgrades to py3.9, fix bugs to support audio less than 4s.
673
  <br>
674
  [10/14]: Hugging face supports free L40S GPU for this project now!
675
  </div>