Vidit2003 gouldj2 commited on
Commit
ac53e7f
·
1 Parent(s): 8b06f46

Update README.md (#1)

Browse files

- Update README.md (b8528a3d2df4510c2ae26d06ec0bbf1964846b6d)


Co-authored-by: Joshua Gould <gouldj2@users.noreply.huggingface.co>

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -102,7 +102,7 @@ class PerImageNormalize(nn.Module):
102
 
103
 
104
  # Load model
105
- device = "cuda"
106
  model = AutoModel.from_pretrained("CaicedoLab/MorphEm", trust_remote_code=True)
107
  model.to(device).eval()
108
 
 
102
 
103
 
104
  # Load model
105
+ device = "cuda" if torch.cuda.is_available() else "cpu"
106
  model = AutoModel.from_pretrained("CaicedoLab/MorphEm", trust_remote_code=True)
107
  model.to(device).eval()
108