[webui] upgrade webui and fix api (#8460)

This commit is contained in:
Yaowei Zheng
2025-06-25 21:59:58 +08:00
committed by GitHub
parent f276b9a963
commit 4407231a3b
9 changed files with 109 additions and 27 deletions

View File

@@ -112,7 +112,7 @@ def get_trainer_info(lang: str, output_path: os.PathLike, do_train: bool) -> tup
running_log_path = os.path.join(output_path, RUNNING_LOG)
if os.path.isfile(running_log_path):
with open(running_log_path, encoding="utf-8") as f:
running_log = f.read()[-20000:] # avoid lengthy log
running_log = "```\n" + f.read()[-20000:] + "\n```\n" # avoid lengthy log
trainer_log_path = os.path.join(output_path, TRAINER_LOG)
if os.path.isfile(trainer_log_path):