mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-08-01 11:12:50 +08:00
[webui] fix elems (#8587)
This commit is contained in:
parent
766884fa5c
commit
cf1087d409
@ -50,15 +50,12 @@ class Engine:
|
|||||||
r"""Get the initial value of gradio components and restores training status if necessary."""
|
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
|
user_config = load_config() if not self.demo_mode else {} # do not use config in demo mode
|
||||||
lang = user_config.get("lang") or "en"
|
lang = user_config.get("lang") or "en"
|
||||||
hub_name = user_config.get("hub_name") or "huggingface"
|
init_dict = {"top.lang": {"value": lang}, "infer.chat_box": {"visible": self.chatter.loaded}}
|
||||||
init_dict = {
|
|
||||||
"top.lang": {"value": lang},
|
|
||||||
"top.hub_name": {"value": hub_name},
|
|
||||||
"infer.chat_box": {"visible": self.chatter.loaded},
|
|
||||||
}
|
|
||||||
|
|
||||||
if not self.pure_chat:
|
if not self.pure_chat:
|
||||||
current_time = get_time()
|
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.current_time"] = {"value": current_time}
|
||||||
init_dict["train.output_dir"] = {"value": f"train_{current_time}"}
|
init_dict["train.output_dir"] = {"value": f"train_{current_time}"}
|
||||||
init_dict["train.config_path"] = {"value": f"{current_time}.yaml"}
|
init_dict["train.config_path"] = {"value": f"{current_time}.yaml"}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user