JotunnBurton commited on
Commit
fa128cf
·
verified ·
1 Parent(s): 8cc38b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -212,7 +212,8 @@ if __name__ == "__main__":
212
  config_path = hf_hub_download(repo_id=link, filename="config.json")
213
  model_path = hf_hub_download(repo_id=link, filename=f"{name}.pth")
214
  hps = utils.get_hparams_from_file(config_path)
215
- net_g_ms = get_net_g(model_path, "v1", device, hps)
 
216
  models.append((name, title, example, list(hps.data.spk2id.keys()), net_g_ms, create_tts_fn(net_g_ms, hps)))
217
 
218
  # ✅ Gradio UI แบบพร้อมใช้กับ Spaces
 
212
  config_path = hf_hub_download(repo_id=link, filename="config.json")
213
  model_path = hf_hub_download(repo_id=link, filename=f"{name}.pth")
214
  hps = utils.get_hparams_from_file(config_path)
215
+ version = hps.version if hasattr(hps, "version") else latest_version
216
+ net_g_ms = get_net_g(model_path, version, device, hps)
217
  models.append((name, title, example, list(hps.data.spk2id.keys()), net_g_ms, create_tts_fn(net_g_ms, hps)))
218
 
219
  # ✅ Gradio UI แบบพร้อมใช้กับ Spaces