FantasticGNU commited on
Commit
f9cd01d
·
1 Parent(s): 9419e15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -24,9 +24,9 @@ args = {
24
  }
25
 
26
  model = OpenLLAMAPEFTModel(**args)
27
- delta_ckpt = torch.load(args['delta_ckpt_path'])
28
  model.load_state_dict(delta_ckpt, strict=False)
29
- delta_ckpt = torch.load(args['anomalygpt_ckpt_path'])
30
  model.load_state_dict(delta_ckpt, strict=False)
31
  model = model.eval().to(torch.bfloat16)#.half()#.cuda()
32
  # model.image_decoder = model.image_decoder.cuda()
 
24
  }
25
 
26
  model = OpenLLAMAPEFTModel(**args)
27
+ delta_ckpt = torch.load(args['delta_ckpt_path'], map_location=torch.device('cpu'))
28
  model.load_state_dict(delta_ckpt, strict=False)
29
+ delta_ckpt = torch.load(args['anomalygpt_ckpt_path'], map_location=torch.device('cpu'))
30
  model.load_state_dict(delta_ckpt, strict=False)
31
  model = model.eval().to(torch.bfloat16)#.half()#.cuda()
32
  # model.image_decoder = model.image_decoder.cuda()