Googlefan commited on
Commit
043b257
1 Parent(s): 575cef2

refactor(app.py): move model and uid initialization inside function

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,11 +4,11 @@ from sbv2_bindings import TTSModel
4
 
5
  bert = hf_hub_download("googlefan/sbv2_onnx_models", "deberta.onnx")
6
  tokenizer = hf_hub_download("googlefan/sbv2_onnx_models", "tokenizer.json")
7
- model = TTSModel.from_path(bert, tokenizer)
8
- uid = "default"
9
 
10
 
11
  def load_and_synthesize(text: str, path: str, sdp: float = 0.0, speed: float = 1.0):
 
 
12
  path = path.split("/")
13
  filename = path[-1]
14
  repo_id = "/".join(path[:-1])
 
4
 
5
  bert = hf_hub_download("googlefan/sbv2_onnx_models", "deberta.onnx")
6
  tokenizer = hf_hub_download("googlefan/sbv2_onnx_models", "tokenizer.json")
 
 
7
 
8
 
9
  def load_and_synthesize(text: str, path: str, sdp: float = 0.0, speed: float = 1.0):
10
+ model = TTSModel.from_path(bert, tokenizer)
11
+ uid = "default"
12
  path = path.split("/")
13
  filename = path[-1]
14
  repo_id = "/".join(path[:-1])