rendy-ad89 commited on
Commit
28efa8b
1 Parent(s): be2327a

fix cpu setting

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -13,7 +13,7 @@ model = BertForSequenceClassification.from_pretrained(model_name,
13
  num_labels=len(label_dict),
14
  output_attentions=False,
15
  output_hidden_states=False)
16
- model.load_state_dict(torch.load('finetuned_BERT_epoch_9.model'), map_location=torch.device('cpu'))
17
 
18
  from transformers import TextClassificationPipeline
19
  pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)
 
13
  num_labels=len(label_dict),
14
  output_attentions=False,
15
  output_hidden_states=False)
16
+ model.load_state_dict(torch.load('finetuned_BERT_epoch_9.model', map_location=torch.device('cpu')))
17
 
18
  from transformers import TextClassificationPipeline
19
  pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer, return_all_scores=True)