jonghhhh commited on
Commit
2aff68f
1 Parent(s): 4dac568

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ from io import BytesIO
9
  def load_model():
10
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
11
  model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=7)
12
- model_state_dict = torch.load('sentiment7_model_acc8878.pth', map_location=torch.device('cpu') # cpu 사용
13
  model.load_state_dict(model_state_dict)
14
  model.eval()
15
  return model, tokenizer
 
9
  def load_model():
10
  tokenizer = BertTokenizer.from_pretrained('bert-base-uncased')
11
  model = BertForSequenceClassification.from_pretrained('bert-base-uncased', num_labels=7)
12
+ model_state_dict = torch.load('sentiment7_model_acc8878.pth', map_location=torch.device('cpu')) # cpu 사용
13
  model.load_state_dict(model_state_dict)
14
  model.eval()
15
  return model, tokenizer