Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,10 @@ config.num_labels = 8 # Set it to the number of classes in your SER task
|
|
13 |
|
14 |
# Load the pre-trained model with the modified configuration
|
15 |
model = HubertForSequenceClassification.from_pretrained("superb/hubert-large-superb-er", config=config, ignore_mismatched_sizes=True)
|
|
|
16 |
checkpoint =torch.load(model_name, map_location = device)
|
17 |
model.load_state_dict(checkpoint)
|
18 |
-
|
19 |
|
20 |
model.eval()
|
21 |
|
|
|
13 |
|
14 |
# Load the pre-trained model with the modified configuration
|
15 |
model = HubertForSequenceClassification.from_pretrained("superb/hubert-large-superb-er", config=config, ignore_mismatched_sizes=True)
|
16 |
+
model.to(device)
|
17 |
checkpoint =torch.load(model_name, map_location = device)
|
18 |
model.load_state_dict(checkpoint)
|
19 |
+
|
20 |
|
21 |
model.eval()
|
22 |
|