Spaces:
Runtime error
Runtime error
fix: setup func
Browse files
setup.py
CHANGED
|
@@ -13,6 +13,12 @@ def download_manga_line_extraction_model():
|
|
| 13 |
if os.path.exists("./models/erika.pth"):
|
| 14 |
return
|
| 15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
def download_anime2sketch_model():
|
| 18 |
if os.path.exists("./models/netG.pth"):
|
|
|
|
| 13 |
if os.path.exists("./models/erika.pth"):
|
| 14 |
return
|
| 15 |
|
| 16 |
+
with requests.get(MANGA_LINE_EXTRACTION_MODEL, stream=True) as r:
|
| 17 |
+
r.raise_for_status()
|
| 18 |
+
with open("./models/erika.pth", "wb") as f:
|
| 19 |
+
for chunk in r.iter_content(chunk_size=8192):
|
| 20 |
+
f.write(chunk)
|
| 21 |
+
|
| 22 |
|
| 23 |
def download_anime2sketch_model():
|
| 24 |
if os.path.exists("./models/netG.pth"):
|