Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
175 |
-
print(
|
176 |
# Load the configuration data for each model (including speaker_id_map)
|
177 |
-
config = load_model_configuration(models_path,
|
178 |
|
179 |
if config:
|
180 |
-
model_configurations[
|
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(""
|
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:
|