Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 = "
|
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)
|