add ds config to webui

Former-commit-id: 66d72b263d36dc81de9f6152077663b613035977
This commit is contained in:
hiyouga
2024-05-29 01:13:17 +08:00
parent 351b4efc6c
commit cb1a49aa02
5 changed files with 123 additions and 4 deletions

View File

@@ -5,7 +5,7 @@ from .common import get_model_path, list_dataset, load_config
from .locales import LOCALES
from .manager import Manager
from .runner import Runner
from .utils import get_time
from .utils import get_time, save_ds_config
if TYPE_CHECKING:
@@ -19,6 +19,8 @@ class Engine:
self.manager = Manager()
self.runner = Runner(self.manager, demo_mode)
self.chatter = WebChatModel(self.manager, demo_mode, lazy_init=(not pure_chat))
if not demo_mode:
save_ds_config()
def _update_component(self, input_dict: Dict[str, Dict[str, Any]]) -> Dict["Component", "Component"]:
r"""