Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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('
|
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 |
|