From 1478c5845cac85789a2c16b522f5cb523aa07bd0 Mon Sep 17 00:00:00 2001 From: Daniel Gatis Date: Wed, 19 Aug 2020 10:32:38 -0300 Subject: [PATCH] fix issue #2 --- setup.py | 2 +- src/rembg/u2net/detect.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/setup.py b/setup.py index f55f7b4..843a42b 100644 --- a/setup.py +++ b/setup.py @@ -11,7 +11,7 @@ with open("requirements.txt") as f: setup( name="rembg", - version="1.0.5", + version="1.0.6", description="Remove image background", long_description=long_description, long_description_content_type="text/markdown", diff --git a/src/rembg/u2net/detect.py b/src/rembg/u2net/detect.py index 0339001..9934c6d 100644 --- a/src/rembg/u2net/detect.py +++ b/src/rembg/u2net/detect.py @@ -28,6 +28,8 @@ def download_url(url, model_name, output_path): if os.path.exists(output_path): return + os.makedirs(os.path.expanduser("~/.u2net"), exist_ok=True) + print( f"Downloading model to {output_path}".format(output_path=output_path), file=sys.stderr,