YEINJEONG commited on
Commit
0a85f4d
1 Parent(s): 973a996

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -9,7 +9,7 @@ def load_model():
9
  tokenizer = BertTokenizer.from_pretrained('beomi/kcbert-base')
10
  config = BertConfig.from_pretrained('beomi/kcbert-base', num_labels=7)
11
  model = BertForSequenceClassification.from_pretrained('beomi/kcbert-base', config=config)
12
- model_state_dict = torch.load('sentiment7_model_acc0.9653.pth', map_location=torch.device('cpu')) # cpu 사용
13
  model.load_state_dict(model_state_dict)
14
  model.eval()
15
  return model, tokenizer
 
9
  tokenizer = BertTokenizer.from_pretrained('beomi/kcbert-base')
10
  config = BertConfig.from_pretrained('beomi/kcbert-base', num_labels=7)
11
  model = BertForSequenceClassification.from_pretrained('beomi/kcbert-base', config=config)
12
+ model_state_dict = torch.load('YEINJEONG/sentiment7', map_location=torch.device('cpu')) # cpu 사용
13
  model.load_state_dict(model_state_dict)
14
  model.eval()
15
  return model, tokenizer