From cf1087d409b2513338f9f32a33b6d95919b96d91 Mon Sep 17 00:00:00 2001 From: Yaowei Zheng Date: Tue, 8 Jul 2025 21:16:42 +0800 Subject: [PATCH] [webui] fix elems (#8587) --- src/llamafactory/webui/engine.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/llamafactory/webui/engine.py b/src/llamafactory/webui/engine.py index ba63fa43..eb1aa443 100644 --- a/src/llamafactory/webui/engine.py +++ b/src/llamafactory/webui/engine.py @@ -50,15 +50,12 @@ class Engine: r"""Get the initial value of gradio components and restores training status if necessary.""" user_config = load_config() if not self.demo_mode else {} # do not use config in demo mode lang = user_config.get("lang") or "en" - hub_name = user_config.get("hub_name") or "huggingface" - init_dict = { - "top.lang": {"value": lang}, - "top.hub_name": {"value": hub_name}, - "infer.chat_box": {"visible": self.chatter.loaded}, - } + init_dict = {"top.lang": {"value": lang}, "infer.chat_box": {"visible": self.chatter.loaded}} if not self.pure_chat: current_time = get_time() + hub_name = user_config.get("hub_name") or "huggingface" + init_dict["top.hub_name"] = {"value": hub_name} init_dict["train.current_time"] = {"value": current_time} init_dict["train.output_dir"] = {"value": f"train_{current_time}"} init_dict["train.config_path"] = {"value": f"{current_time}.yaml"}