aaristov commited on
Commit
eb7902e
·
verified ·
1 Parent(s): 4a8917a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -12,7 +12,7 @@ CLASSES = ["positive", "planktonic", "clumped", "rods", "filaments"]
12
  _weights = hf_hub_download("aaristov/bacterial-morphology-resnet34", "bacteria_trained_model_resnet34")
13
  model = torchvision.models.resnet34()
14
  model.fc = torch.nn.Linear(512, len(CLASSES))
15
- model.load_state_dict(torch.load(_weights, map_location="cpu"))
16
  model.eval()
17
 
18
  tfm = transforms.Compose([
 
12
  _weights = hf_hub_download("aaristov/bacterial-morphology-resnet34", "bacteria_trained_model_resnet34")
13
  model = torchvision.models.resnet34()
14
  model.fc = torch.nn.Linear(512, len(CLASSES))
15
+ model.load_state_dict(torch.load(_weights, map_location="cpu", weights_only=True))
16
  model.eval()
17
 
18
  tfm = transforms.Compose([