Stylesaniswi
commited on
Commit
•
c798c80
1
Parent(s):
b57d8c2
changes
Browse files- app.py +2 -1
- model_hubert_finetuned_nopeft.pth +2 -2
app.py
CHANGED
@@ -11,7 +11,8 @@ config.label2id = {"neu": 0, "hap": 1, "ang": 2, "sad": 3, "dis": 4, "sur": 5, "
|
|
11 |
config.num_labels = 8 # Set it to the number of classes in your SER task
|
12 |
|
13 |
# Load the pre-trained model with the modified configuration
|
14 |
-
model = HubertForSequenceClassification.from_pretrained(
|
|
|
15 |
model.to('cuda' if torch.cuda.is_available() else 'cpu')
|
16 |
model.eval()
|
17 |
|
|
|
11 |
config.num_labels = 8 # Set it to the number of classes in your SER task
|
12 |
|
13 |
# Load the pre-trained model with the modified configuration
|
14 |
+
model = HubertForSequenceClassification.from_pretrained("superb/hubert-large-superb-er", config=config, ignore_mismatched_sizes=True)
|
15 |
+
model.load_state_dict(torch.load(model_name))
|
16 |
model.to('cuda' if torch.cuda.is_available() else 'cpu')
|
17 |
model.eval()
|
18 |
|
model_hubert_finetuned_nopeft.pth
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:
|
3 |
-
size
|
|
|
1 |
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:58ee5f8eb8921986214e4a4d74b31f06e205e27ee3a3f54f877619bcb94fab77
|
3 |
+
size 1262994278
|