Spaces:
Sleeping
Sleeping
Update landmark_detection.py
Browse files- landmark_detection.py +1 -3
landmark_detection.py
CHANGED
@@ -49,13 +49,11 @@ transforms_image = torchvision.transforms.Compose(
|
|
49 |
def load_model(weights_path):
|
50 |
model = FaceXFormer().to(device)
|
51 |
if not os.path.exists(weights_path):
|
52 |
-
name = os.path.basename(weights_path)
|
53 |
-
path = os.path.dirname(weights_path)
|
54 |
huggingface_hub.hf_hub_download(
|
55 |
"kartiknarayan/facexformer",
|
56 |
"ckpts/model.pt",
|
57 |
repo_type="model",
|
58 |
-
local_dir=
|
59 |
)
|
60 |
checkpoint = torch.load(weights_path, map_location=device)
|
61 |
model.load_state_dict(checkpoint)
|
|
|
49 |
def load_model(weights_path):
|
50 |
model = FaceXFormer().to(device)
|
51 |
if not os.path.exists(weights_path):
|
|
|
|
|
52 |
huggingface_hub.hf_hub_download(
|
53 |
"kartiknarayan/facexformer",
|
54 |
"ckpts/model.pt",
|
55 |
repo_type="model",
|
56 |
+
local_dir=".",
|
57 |
)
|
58 |
checkpoint = torch.load(weights_path, map_location=device)
|
59 |
model.load_state_dict(checkpoint)
|