Former-commit-id: 67af68f4fc5232760c57b3a0ae780628da09db6a
This commit is contained in:
hiyouga
2024-06-03 23:30:37 +08:00
parent 4c1f015eca
commit 26bc79f971
5 changed files with 26 additions and 13 deletions

View File

@@ -180,7 +180,7 @@ def check_output_dir(lang: str, model_name: str, finetuning_type: str, output_di
r"""
Check if output dir exists.
"""
if os.path.isdir(get_save_dir(model_name, finetuning_type, output_dir)):
if model_name and output_dir and os.path.isdir(get_save_dir(model_name, finetuning_type, output_dir)):
gr.Warning(ALERTS["warn_output_dir_exists"][lang])