Spaces:
Runtime error
Runtime error
Commit
Β·
dd6adc1
1
Parent(s):
a8380cb
update
Browse files
app.py
CHANGED
@@ -76,9 +76,10 @@ preprocess_model = load_preprocess_model()
|
|
76 |
config = OmegaConf.load("configs/config_customnet.yaml")
|
77 |
model = instantiate_from_config(config.model)
|
78 |
|
79 |
-
model_path='./customnet_v1.pt
|
80 |
-
|
81 |
-
|
|
|
82 |
ckpt = torch.load(model_path, map_location="cpu")
|
83 |
model.load_state_dict(ckpt)
|
84 |
del ckpt
|
|
|
76 |
config = OmegaConf.load("configs/config_customnet.yaml")
|
77 |
model = instantiate_from_config(config.model)
|
78 |
|
79 |
+
model_path='./customnet_v1.pt'
|
80 |
+
#model_path='./customnet_v1.pt?download=true'
|
81 |
+
#if not os.path.exists(model_path):
|
82 |
+
# os.system(f'wget https://huggingface.co/TencentARC/CustomNet/resolve/main/customnet_v1.pt?download=true -P .')
|
83 |
ckpt = torch.load(model_path, map_location="cpu")
|
84 |
model.load_state_dict(ckpt)
|
85 |
del ckpt
|