LemonPit commited on
Commit
2a3e290
1 Parent(s): acdf619

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ from transformers import SamModel, SamProcessor
9
  # Load the processor and model
10
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
11
  model = SamModel.from_pretrained("facebook/sam-vit-base")
12
- model_path = "SAM/mito_model_checkpoint.pth"
13
  model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
15
  model.to(device)
 
9
  # Load the processor and model
10
  processor = SamProcessor.from_pretrained("facebook/sam-vit-base")
11
  model = SamModel.from_pretrained("facebook/sam-vit-base")
12
+ model_path = "mito_model_checkpoint.pth"
13
  model.load_state_dict(torch.load(model_path, map_location=torch.device('cpu')))
14
  device = "cuda" if torch.cuda.is_available() else "cpu"
15
  model.to(device)