Flux9665 commited on
Commit
a6e24ad
·
1 Parent(s): 62d7978

try to figure out how ZeroGPU works

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -21,10 +21,11 @@ from Utility.storage_config import MODELS_DIR
21
 
22
  class ControllableInterface(torch.nn.Module):
23
 
 
24
  def __init__(self, available_artificial_voices=1000):
25
  super().__init__()
26
  self.model = ToucanTTSInterface(device="cpu", tts_model_path="Meta")
27
- self.wgan = GanWrapper(os.path.join(MODELS_DIR, "Embedding", "embedding_gan.pt"), device="cpu")
28
  self.generated_speaker_embeds = list()
29
  self.available_artificial_voices = available_artificial_voices
30
  self.current_language = ""
 
21
 
22
  class ControllableInterface(torch.nn.Module):
23
 
24
+ @spaces.GPU
25
  def __init__(self, available_artificial_voices=1000):
26
  super().__init__()
27
  self.model = ToucanTTSInterface(device="cpu", tts_model_path="Meta")
28
+ self.wgan = GanWrapper(os.path.join(MODELS_DIR, "Embedding", "embedding_gan.pt"), device="cuda")
29
  self.generated_speaker_embeds = list()
30
  self.available_artificial_voices = available_artificial_voices
31
  self.current_language = ""