Spaces:
Runtime error
Runtime error
hasibzunair
commited on
Commit
β’
ed22721
1
Parent(s):
bfaa985
update
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import os
|
|
3 |
import time
|
4 |
import sys
|
5 |
import torch
|
|
|
6 |
import gradio as gr
|
7 |
import u2net_load
|
8 |
import u2net_run
|
@@ -59,8 +60,11 @@ if not os.path.exists("saved_models/u2net/u2net.pth"):
|
|
59 |
# Get model checkpoints
|
60 |
if not os.path.exists("./checkpoints/decavtonfifapretrain/"):
|
61 |
os.system("wget -O ./checkpoints/decavtonfifapretrain.zip https://github.com/hasibzunair/vton-demo/releases/download/v1.0/decavtonfifapretrain.zip")
|
62 |
-
|
63 |
-
os.system("
|
|
|
|
|
|
|
64 |
|
65 |
print("########################Setup done!########################")
|
66 |
|
|
|
3 |
import time
|
4 |
import sys
|
5 |
import torch
|
6 |
+
import zipfile
|
7 |
import gradio as gr
|
8 |
import u2net_load
|
9 |
import u2net_run
|
|
|
60 |
# Get model checkpoints
|
61 |
if not os.path.exists("./checkpoints/decavtonfifapretrain/"):
|
62 |
os.system("wget -O ./checkpoints/decavtonfifapretrain.zip https://github.com/hasibzunair/vton-demo/releases/download/v1.0/decavtonfifapretrain.zip")
|
63 |
+
# Works locally
|
64 |
+
#os.system("sudo apt-get install zip unzip")
|
65 |
+
#os.system("unzip ./checkpoints/decavtonfifapretrain.zip -d ./checkpoints/")
|
66 |
+
with zipfile.ZipFile('./checkpoints/decavtonfifapretrain.zip', 'r') as zip_ref:
|
67 |
+
zip_ref.extractall('./checkpoints/')
|
68 |
|
69 |
print("########################Setup done!########################")
|
70 |
|