Add language identification. (#153)

* Add language identification.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
Artrajz
2023-11-06 21:56:09 +08:00
committed by GitHub
parent 096d661a4b
commit c86da6eeeb
6 changed files with 336 additions and 1 deletions

View File

@@ -142,6 +142,7 @@ class Webui_config:
device: str,
model: str,
config_path: str,
language_identification_library: str,
port: int = 7860,
share: bool = False,
debug: bool = False,
@@ -152,6 +153,9 @@ class Webui_config:
self.port: int = port # 是否开启debug模式
self.share: bool = share # 模型路径
self.debug: bool = debug # 配置文件路径
self.language_identification_library: str = (
language_identification_library # 语种识别库
)
@classmethod
def from_dict(cls, dataset_path: str, data: Dict[str, any]):