ybhavsar2009 commited on
Commit
4c9590c
·
verified ·
1 Parent(s): 1a0610b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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):