Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -77,7 +77,7 @@ sam2_model = build_sam2(model_cfg, sam2_checkpoint, device=device)
|
|
77 |
predictor = SAM2ImagePredictor(sam2_model)
|
78 |
|
79 |
checkpoint_path = "sam2_lr0.0001_wd0.01_900.torch"
|
80 |
-
predictor.model.load_state_dict(torch.load(checkpoint_path))
|
81 |
|
82 |
def display_thread(thread_id):
|
83 |
for message in client.beta.threads.messages.list(thread_id=thread_id):
|
|
|
77 |
predictor = SAM2ImagePredictor(sam2_model)
|
78 |
|
79 |
checkpoint_path = "sam2_lr0.0001_wd0.01_900.torch"
|
80 |
+
predictor.model.load_state_dict(torch.load(checkpoint_path, map_location=torch.device('cpu')))
|
81 |
|
82 |
def display_thread(thread_id):
|
83 |
for message in client.beta.threads.messages.list(thread_id=thread_id):
|