Gregniuki commited on
Commit
8b4b8b8
·
1 Parent(s): 0aa91a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -5
app.py CHANGED
@@ -132,6 +132,7 @@ async def main(
132
  elif isinstance(onnx_models, str):
133
  onnx_model = onnx_models
134
  model, config = load_onnx(onnx_model, sess_options, providers)
 
135
  if config["num_speakers"] > 1:
136
  speaker_selection.options = config["speaker_id_map"].values()
137
  speaker_selection.layout.visibility = 'visible'
@@ -155,11 +156,11 @@ async def main(
155
  # )
156
  # config = None
157
  # def load_model(button):
158
- # nonlocal config
159
- # global onnx_model
160
- # nonlocal model
161
- # nonlocal models_path
162
- # selected_voice = selection.value
163
  onnx_model = f"{models_path}/{selected_voice}"
164
  model, config = load_onnx(onnx_model, sess_options, providers)
165
  # if enhanced_accessibility:
 
132
  elif isinstance(onnx_models, str):
133
  onnx_model = onnx_models
134
  model, config = load_onnx(onnx_model, sess_options, providers)
135
+ print("nuber of speakers = ", config["num_speakers"])
136
  if config["num_speakers"] > 1:
137
  speaker_selection.options = config["speaker_id_map"].values()
138
  speaker_selection.layout.visibility = 'visible'
 
156
  # )
157
  # config = None
158
  # def load_model(button):
159
+ nonlocal config
160
+ global onnx_model
161
+ nonlocal model
162
+ nonlocal models_path
163
+ selected_voice = selection.value
164
  onnx_model = f"{models_path}/{selected_voice}"
165
  model, config = load_onnx(onnx_model, sess_options, providers)
166
  # if enhanced_accessibility: