Spaces:
Runtime error
Runtime error
hcs
commited on
Commit
·
d42ee1a
1
Parent(s):
b8a0eab
Add application file
Browse files
core.py
CHANGED
@@ -13,11 +13,11 @@ def load_model(pretrained_dict, new):
|
|
13 |
new.load_state_dict(model_dict)
|
14 |
|
15 |
|
16 |
-
if torch.cuda.is_available():
|
17 |
-
|
18 |
-
else:
|
19 |
-
|
20 |
-
|
21 |
|
22 |
# model_ckpt_path = "./models/resnet18.pth"
|
23 |
model_ckpt_path = "https://huggingface.co/M4869/beauty_prediction_fpb5k/blob/main/resnet18.pth"
|
|
|
13 |
new.load_state_dict(model_dict)
|
14 |
|
15 |
|
16 |
+
# if torch.cuda.is_available():
|
17 |
+
# device = torch.device("cuda")
|
18 |
+
# else:
|
19 |
+
device = torch.device("cpu")
|
20 |
+
print("use cpu")
|
21 |
|
22 |
# model_ckpt_path = "./models/resnet18.pth"
|
23 |
model_ckpt_path = "https://huggingface.co/M4869/beauty_prediction_fpb5k/blob/main/resnet18.pth"
|