Gregniuki commited on
Commit
d882d59
·
1 Parent(s): a8ba439

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -171,17 +171,17 @@ async def load_model_data():
171
  onnx_models = model_names # Populate onnx_models here
172
  print(config_names[0])
173
  print(model_names[0])
174
- for config_name in config_names:
175
- print(config_name)
176
  # Load the configuration data for each model (including speaker_id_map)
177
- config = load_model_configuration(models_path, config_name) # Pass config_name, not models_path
178
 
179
  if config:
180
- model_configurations[config_name] = config
181
 
182
  def load_model_configuration(models_path, config_name):
183
  # Assuming config_name is the name of the JSON configuration file, e.g., 'model.json'
184
- config_file_path = os.path.join("", config_name)
185
 
186
  try:
187
  with open(config_file_path, 'r') as config_file:
 
171
  onnx_models = model_names # Populate onnx_models here
172
  print(config_names[0])
173
  print(model_names[0])
174
+ for model_name in model_names:
175
+ print(model_name)
176
  # Load the configuration data for each model (including speaker_id_map)
177
+ config = load_model_configuration(models_path, model_name) # Pass config_name, not models_path
178
 
179
  if config:
180
+ model_configurations[model_name] = config
181
 
182
  def load_model_configuration(models_path, config_name):
183
  # Assuming config_name is the name of the JSON configuration file, e.g., 'model.json'
184
+ config_file_path = os.path.join(config_name, ".json")
185
 
186
  try:
187
  with open(config_file_path, 'r') as config_file: