Sushrut98 commited on
Commit
70c01fa
·
verified ·
1 Parent(s): 8a96862

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,10 +16,10 @@ tokenizer = BertTokenizer.from_pretrained('bert-base-uncased',
16
  do_lower_case=True)
17
  # Create BERT model
18
  model = BertForSequenceClassification.from_pretrained("bert-base-uncased",
19
- num_labels=len(label_dict),
20
  output_attentions=False,
21
  output_hidden_states=False)
22
- model.load_state_dict(torch.load('/content/finetuned_BERT_epoch_10.model', map_location=torch.device('cpu')))
23
  ### 3. Predict function ###
24
 
25
  # Create predict function
 
16
  do_lower_case=True)
17
  # Create BERT model
18
  model = BertForSequenceClassification.from_pretrained("bert-base-uncased",
19
+ num_labels=2,
20
  output_attentions=False,
21
  output_hidden_states=False)
22
+ model.load_state_dict(torch.load(f='finetuned_BERT_epoch_10.model', map_location=torch.device('cpu')))
23
  ### 3. Predict function ###
24
 
25
  # Create predict function