Skip to content

Commit

Permalink
fix spelling mistake
Browse files Browse the repository at this point in the history
  • Loading branch information
SUC-DriverOld committed Aug 4, 2024
1 parent 295b2fd commit 86a8ad5
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions webUI.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

PACKAGE_VERSION = "1.4.1"
PRESETS = "data/preset_data.json"
MOSELS = "data/model_map.json"
MODELS = "data/model_map.json"
WEBUI_CONFIG = "data/webui_config.json"
VR_MODEL = "data/vr_model.json"
AUGMENTATIONS_CONFIG = "configs_template/augmentations_template.yaml"
Expand Down Expand Up @@ -124,7 +124,7 @@ def load_augmentations_config():


def load_msst_model():
config = load_configs(MOSELS)
config = load_configs(MODELS)
model_list = []
downloaded_model_list = []
for keys in config.keys():
Expand All @@ -139,7 +139,7 @@ def load_msst_model():


def get_msst_model(model_name):
config = load_configs(MOSELS)
config = load_configs(MODELS)
for keys in config.keys():
for model in config[keys]:
if model["name"] == model_name:
Expand Down Expand Up @@ -820,12 +820,12 @@ def upgrade_download_model_name(model_type_dropdown):
model_map = load_configs(VR_MODEL)
return gr.Dropdown(label="选择模型", choices=[keys for keys in model_map.keys()])
else:
model_map = load_configs(MOSELS)
model_map = load_configs(MODELS)
return gr.Dropdown(label="选择模型", choices=[model["name"] for model in model_map[model_type_dropdown]])


def download_model(model_type, model_name):
models = load_configs(MOSELS)
models = load_configs(MODELS)
model_choices = list(models.keys())
model_choices.append("UVR_VR_Models")
if model_type not in model_choices:
Expand All @@ -847,7 +847,7 @@ def download_model(model_type, model_name):

return download_file(model_url, os.path.join(model_path, model_name), model_name)

presets = load_configs(MOSELS)
presets = load_configs(MODELS)
model_mapping = load_msst_model()

if model_name in model_mapping:
Expand Down Expand Up @@ -883,7 +883,7 @@ def download_file(url, path, model_name):
return f"模型 '{model_name}' 下载失败。错误信息: {str(e)}"

def manual_download_model(model_type, model_name):
models = load_configs(MOSELS)
models = load_configs(MODELS)
model_choices = list(models.keys())
model_choices.append("UVR_VR_Models")
if model_type not in model_choices:
Expand All @@ -899,7 +899,7 @@ def manual_download_model(model_type, model_name):

model_url = vr_model_map[model_name]["download_link"]
else:
presets = load_configs(MOSELS)
presets = load_configs(MODELS)
model_mapping = load_msst_model()

if model_name in model_mapping:
Expand Down Expand Up @@ -1024,7 +1024,7 @@ def webui_goto_github():

webui_config = load_configs(WEBUI_CONFIG)
presets = load_configs(PRESETS)
models = load_configs(MOSELS)
models = load_configs(MODELS)
vr_model = load_configs(VR_MODEL)

with gr.TabItem(label="MSST分离"):
Expand Down

0 comments on commit 86a8ad5

Please sign in to comment.