Inosen-Infinity commited on
Commit
97cf7d3
·
verified ·
1 Parent(s): 2186665

Load final model in app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -16,7 +16,7 @@ def get_model_and_tokenizer():
16
  tokenizer = AutoTokenizer.from_pretrained(model_name)
17
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=num_labels)
18
 
19
- chkp = torch.load("arxiv_roberta_9unfrozen_5scaleloss.pt", map_location=device)
20
  model.load_state_dict(chkp['model'])
21
 
22
  return model, tokenizer
 
16
  tokenizer = AutoTokenizer.from_pretrained(model_name)
17
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=num_labels)
18
 
19
+ chkp = torch.load("arxiv_roberta_final.pt", map_location=device)
20
  model.load_state_dict(chkp['model'])
21
 
22
  return model, tokenizer