Skip to content

Commit

Permalink
feat: update app
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeyi-Lin committed Sep 6, 2024
1 parent 598ecd7 commit e48d366
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,10 @@ def idphoto_inference(
for file in os.listdir(os.path.join(root_dir, "hivision/creator/weights"))
if file.endswith(".onnx")
]
DEFAULT_MATTING_MODEL = "modnet_photographic_portrait_matting"
if DEFAULT_MATTING_MODEL in matting_model_list:
matting_model_list.remove(DEFAULT_MATTING_MODEL)
matting_model_list.insert(0, DEFAULT_MATTING_MODEL)

size_mode_CN = ["尺寸列表", "只换底", "自定义尺寸"]
size_mode_EN = ["Size List", "Only Change Background", "Custom Size"]
Expand Down Expand Up @@ -356,7 +360,7 @@ def load_description(fp):
matting_model_options = gr.Dropdown(
choices=matting_model_list,
label="抠图模型",
value="modnet_photographic_portrait_matting",
value=matting_model_list[0],
elem_id="matting_model",
)

Expand Down

0 comments on commit e48d366

Please sign in to comment.