ki33elev commited on
Commit
e62c2f3
1 Parent(s): 45ac761

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -11,7 +11,7 @@ def load_model():
11
  model_name = 'distilbert-base-cased'
12
  tokenizer = AutoTokenizer.from_pretrained(model_name)
13
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=8)
14
- model.load_state_dict(torch.load('model_weights.pt', map_location=torch.device('cpu')))
15
  model.eval()
16
  return tokenizer, model
17
 
 
11
  model_name = 'distilbert-base-cased'
12
  tokenizer = AutoTokenizer.from_pretrained(model_name)
13
  model = AutoModelForSequenceClassification.from_pretrained(model_name, num_labels=8)
14
+ model.load_state_dict(torch.load('model_weights2.pt', map_location=torch.device('cpu')))
15
  model.eval()
16
  return tokenizer, model
17