celaphee commited on
Commit
c82cd6d
·
unverified ·
1 Parent(s): 4e71c84

Fix model path to src/best_model.pth

Browse files
Files changed (1) hide show
  1. src/streamlit_app.py +1 -1
src/streamlit_app.py CHANGED
@@ -11,7 +11,7 @@ from torchvision.models import resnet18, ResNet18_Weights
11
  def load_model():
12
  model = resnet18(weights=None)
13
  model.fc = torch.nn.Linear(512, 2)
14
- model.load_state_dict(torch.load('best_model.pth', map_location='cpu', weights_only=True))
15
  model.eval()
16
  return model
17
 
 
11
  def load_model():
12
  model = resnet18(weights=None)
13
  model.fc = torch.nn.Linear(512, 2)
14
+ model.load_state_dict(torch.load('src/best_model.pth', map_location='cpu', weights_only=True))
15
  model.eval()
16
  return model
17