mirror of https://github.com/coqui-ai/TTS.git
Update `copy_model_files()`
This commit is contained in:
parent
4163b4f2e4
commit
9a0d8fa027
|
@ -38,6 +38,7 @@ def copy_model_files(config: Coqpit, out_path, new_fields):
|
||||||
"""
|
"""
|
||||||
copy_config_path = os.path.join(out_path, "config.json")
|
copy_config_path = os.path.join(out_path, "config.json")
|
||||||
# add extra information fields
|
# add extra information fields
|
||||||
|
if new_fields:
|
||||||
config.update(new_fields, allow_new=True)
|
config.update(new_fields, allow_new=True)
|
||||||
# TODO: Revert to config.save_json() once Coqpit supports arbitrary paths.
|
# TODO: Revert to config.save_json() once Coqpit supports arbitrary paths.
|
||||||
with fsspec.open(copy_config_path, "w", encoding="utf8") as f:
|
with fsspec.open(copy_config_path, "w", encoding="utf8") as f:
|
||||||
|
|
Loading…
Reference in New Issue