hcs commited on
Commit
d42ee1a
·
1 Parent(s): b8a0eab

Add application file

Browse files
Files changed (1) hide show
  1. core.py +5 -5
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
- 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"
 
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"