oucgc1996 commited on
Commit
1efc8c1
·
verified ·
1 Parent(s): cff9fff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def Kmers_funct(seq,num):
49
 
50
  def ACE(file):
51
  model = MyModel()
52
- model.load_state_dict(torch.load("best_model.pth"))
53
  model = model.to(device)
54
  model.eval()
55
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)
 
49
 
50
  def ACE(file):
51
  model = MyModel()
52
+ model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')), strict=False)
53
  model = model.to(device)
54
  model.eval()
55
  tokenizer = AutoTokenizer.from_pretrained(model_checkpoint)