bachvudinh commited on
Commit
031bc5a
1 Parent(s): 8cfd1b6

remove ensure

Browse files
Files changed (1) hide show
  1. app.py +4 -13
app.py CHANGED
@@ -16,20 +16,11 @@ from generate_audio import (
16
  import uuid
17
 
18
 
19
- @spaces.GPU
20
- def vq_model_load():
21
- device = "cuda" if torch.cuda.is_available() else "cpu"
22
- vq_model = RQBottleneckTransformer.load_model(
23
- "whisper-vq-stoks-medium-en+pl-fixed.model"
24
- ).to(device)
25
- vq_model.ensure_whisper(device)
26
- return vq_model
27
- # device = "cuda" if torch.cuda.is_available() else "cpu"
28
- # vq_model = RQBottleneckTransformer.load_model(
29
- # "whisper-vq-stoks-medium-en+pl-fixed.model"
30
- # ).to(device)
31
  # vq_model.ensure_whisper(device)
32
- vq_model = vq_model_load()
33
 
34
  @spaces.GPU
35
  def audio_to_sound_tokens_whisperspeech(audio_path):
 
16
  import uuid
17
 
18
 
19
+ device = "cuda" if torch.cuda.is_available() else "cpu"
20
+ vq_model = RQBottleneckTransformer.load_model(
21
+ "whisper-vq-stoks-medium-en+pl-fixed.model"
22
+ ).to(device)
 
 
 
 
 
 
 
 
23
  # vq_model.ensure_whisper(device)
 
24
 
25
  @spaces.GPU
26
  def audio_to_sound_tokens_whisperspeech(audio_path):