avanishd commited on
Commit
7a3f895
·
verified ·
1 Parent(s): fb552e4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -5
README.md CHANGED
@@ -70,16 +70,15 @@ weights_path = hf_hub_download(
70
  filename="model.safetensors"
71
  )
72
 
73
- from safetensors.torch import load_file
74
 
75
  model = EfficientNetSkinLesionClassifier()
76
- state = load_file(weights_path)
77
- model.load_state_dict(state, strict=True)
78
-
79
- model.eval() # Set model to evaluation mode
80
 
81
  model.to(device) # Don't forget to put on GPU
82
 
 
 
83
 
84
  # Example with PH2 Dataset
85
 
 
70
  filename="model.safetensors"
71
  )
72
 
73
+ from safetensors.torch import load_model
74
 
75
  model = EfficientNetSkinLesionClassifier()
76
+ load_model(model, filename=weights_path, strict=True)
 
 
 
77
 
78
  model.to(device) # Don't forget to put on GPU
79
 
80
+ model.eval() # Set model to evaluation mode
81
+
82
 
83
  # Example with PH2 Dataset
84