simdi commited on
Commit
3c6df0d
1 Parent(s): 8ddaaac

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +5 -5
handler.py CHANGED
@@ -15,13 +15,13 @@ class EndpointHandler:
15
  def __init__(self, path=""):
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  config = XttsConfig()
18
- config.load_json("./model/config.json")
19
  model = Xtts.init_from_config(config)
20
  model.load_checkpoint(
21
  config,
22
- checkpoint_path="./model/model.pth",
23
- vocab_path="./model/vocab.json",
24
- speaker_file_path="./model/speakers_xtts.pth",
25
  eval=True,
26
  use_deepspeed=device == "cuda",
27
  )
@@ -35,7 +35,7 @@ class EndpointHandler:
35
  gpt_cond_latent,
36
  speaker_embedding,
37
  ) = self.model.get_conditioning_latents(
38
- audio_path="attenborough.mp3",
39
  gpt_cond_len=30,
40
  gpt_cond_chunk_len=4,
41
  max_ref_length=60,
 
15
  def __init__(self, path=""):
16
  device = "cuda" if torch.cuda.is_available() else "cpu"
17
  config = XttsConfig()
18
+ config.load_json("/repository/model/config.json")
19
  model = Xtts.init_from_config(config)
20
  model.load_checkpoint(
21
  config,
22
+ checkpoint_path="/repository/model/model.pth",
23
+ vocab_path="/repository/model/vocab.json",
24
+ speaker_file_path="/repository/model/speakers_xtts.pth",
25
  eval=True,
26
  use_deepspeed=device == "cuda",
27
  )
 
35
  gpt_cond_latent,
36
  speaker_embedding,
37
  ) = self.model.get_conditioning_latents(
38
+ audio_path="/repository/attenborough.mp3",
39
  gpt_cond_len=30,
40
  gpt_cond_chunk_len=4,
41
  max_ref_length=60,