eloicito333 commited on
Commit
f117bd8
·
1 Parent(s): d3d98e0

hf:// error solved --> added hf_hub_download

Browse files
Files changed (2) hide show
  1. handler.py +6 -1
  2. requirements.txt +1 -0
handler.py CHANGED
@@ -21,7 +21,12 @@ class EndpointHandler:
21
  def __init__(self, path=""):
22
  self.vocoder = load_vocoder()
23
  model_cfg = dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)
24
- model_path = "hf://jpgallegoar/F5-Spanish/model_1200000.safetensors"
 
 
 
 
 
25
  self.ema_model = load_model(DiT, model_cfg, model_path)
26
 
27
  def traducir_numero_a_texto(self, texto):
 
21
  def __init__(self, path=""):
22
  self.vocoder = load_vocoder()
23
  model_cfg = dict(dim=1024, depth=22, heads=16, ff_mult=2, text_dim=512, conv_layers=4)
24
+
25
+ model_path = hf_hub_download(
26
+ repo_id="jpgallegoar/F5-Spanish",
27
+ filename="model_1200000.safetensors"
28
+ )
29
+
30
  self.ema_model = load_model(DiT, model_cfg, model_path)
31
 
32
  def traducir_numero_a_texto(self, texto):
requirements.txt CHANGED
@@ -5,4 +5,5 @@ numpy
5
  soundfile
6
  num2words
7
  cached_path
 
8
  git+https://github.com/jpgallegoar/Spanish-F5.git
 
5
  soundfile
6
  num2words
7
  cached_path
8
+ huggingface_hub
9
  git+https://github.com/jpgallegoar/Spanish-F5.git