IvaElen commited on
Commit
f6324ba
·
1 Parent(s): 706fe96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -10,7 +10,7 @@ def load_model():
10
  output_attentions = False,
11
  output_hidden_states = False
12
  )
13
- model_finetuned.load_state_dict(torch.load('ErnieModel_imdb.pt', map_location = 'cpu'))
14
  tokenizer = transformers.AutoTokenizer.from_pretrained("nghuyong/ernie-2.0-base-en")
15
  return model_finetuned, tokenizer
16
 
 
10
  output_attentions = False,
11
  output_hidden_states = False
12
  )
13
+ model_finetuned.load_state_dict(torch.load('ErnieModel_imdb.pt', map_location=torch.device('cpu')))
14
  tokenizer = transformers.AutoTokenizer.from_pretrained("nghuyong/ernie-2.0-base-en")
15
  return model_finetuned, tokenizer
16