oucgc1996 commited on
Commit
1ec9f7f
1 Parent(s): 3a32450

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -39,7 +39,7 @@ def conotoxinfinder(files):
39
  seqs.append(line)
40
 
41
  model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=1)
42
- model.load_state_dict(torch.load("best_model.pth"))
43
  model = model.to(device)
44
 
45
  value_all = []
 
39
  seqs.append(line)
40
 
41
  model = AutoModelForSequenceClassification.from_pretrained(model_checkpoint, num_labels=1)
42
+ model.load_state_dict(torch.load("best_model.pth", map_location=torch.device('cpu')), strict=False)
43
  model = model.to(device)
44
 
45
  value_all = []