fix model choices

This commit is contained in:
Daniel Gatis 2021-10-09 10:40:22 -03:00
parent 972f82ccbb
commit 9405b96d80
4 changed files with 7 additions and 7 deletions

View File

@ -2,8 +2,8 @@ flask>=1.1.2
numpy>=1.19.5
pillow>=8.0.1
scikit-image>=0.17.2
torch>=1.7.0
torchvision>=0.8.1
torch>=1.9.1
torchvision>=0.10.1
waitress>=1.4.4
tqdm>=4.51.0
requests>=2.24.0

View File

@ -11,7 +11,7 @@ with open("requirements.txt") as f:
setup(
name="rembg",
version="1.0.27",
version="1.0.28",
description="Remove image background",
long_description=long_description,
long_description_content_type="text/markdown",

View File

@ -18,8 +18,8 @@ def main():
os.path.splitext(os.path.basename(x))[0]
for x in set(glob.glob(model_path + "/*"))
]
if len(model_choices) == 0:
model_choices = ["u2net", "u2netp", "u2net_human_seg"]
model_choices = list(set(model_choices + ["u2net", "u2netp", "u2net_human_seg"]))
ap = argparse.ArgumentParser()

View File

@ -52,8 +52,8 @@ def index():
os.path.splitext(os.path.basename(x))[0]
for x in set(glob.glob(model_path + "/*"))
]
if len(model_choices) == 0:
model_choices = ["u2net", "u2netp", "u2net_human_seg"]
model_choices = list(set(model_choices + ["u2net", "u2netp", "u2net_human_seg"]))
if model not in model_choices:
return {