Spaces:
Runtime error
Runtime error
hasibzunair
commited on
Commit
β’
1c6d4d2
1
Parent(s):
f8e41d4
update app.py with correct checkpoints
Browse files
app.py
CHANGED
@@ -57,7 +57,7 @@ if not os.path.exists("saved_models/u2net/u2net.pth"):
|
|
57 |
os.system("wget -P saved_models/u2net/ https://github.com/hasibzunair/fifa-demo/releases/download/v1.0/u2net.pth")
|
58 |
|
59 |
# Get model checkpoints
|
60 |
-
if not os.path.exists("./checkpoints/"):
|
61 |
os.system("wget -O ./checkpoints/decavtonfifapretrain.zip https://github.com/hasibzunair/vton-demo/releases/download/v1.0/decavtonfifapretrain.zip")
|
62 |
os.system("unzip ./checkpoints/decavtonfifapretrain.zip -d ./checkpoints/")
|
63 |
|
@@ -67,7 +67,6 @@ print("########################Setup done!########################")
|
|
67 |
print(f"####Using {device}.#####")
|
68 |
u2net = u2net_load.model(model_name = 'u2netp')
|
69 |
|
70 |
-
|
71 |
def composite_background(img_mask, person_image_path, tryon_image_path):
|
72 |
"""Put background back on the person image after tryon."""
|
73 |
person = np.array(Image.open(person_image_path))
|
57 |
os.system("wget -P saved_models/u2net/ https://github.com/hasibzunair/fifa-demo/releases/download/v1.0/u2net.pth")
|
58 |
|
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 |
os.system("unzip ./checkpoints/decavtonfifapretrain.zip -d ./checkpoints/")
|
63 |
|
67 |
print(f"####Using {device}.#####")
|
68 |
u2net = u2net_load.model(model_name = 'u2netp')
|
69 |
|
|
|
70 |
def composite_background(img_mask, person_image_path, tryon_image_path):
|
71 |
"""Put background back on the person image after tryon."""
|
72 |
person = np.array(Image.open(person_image_path))
|