Daniel Gatis 5 년 전
부모
커밋
1478c5845c
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      setup.py
  2. 2 0
      src/rembg/u2net/detect.py

+ 1 - 1
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",

+ 2 - 0
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,