Spaces:
Runtime error
Runtime error
Pavankalyan
commited on
Commit
·
846fa92
1
Parent(s):
2395e91
Update model.py
Browse files
model.py
CHANGED
@@ -43,7 +43,7 @@ class Wav2VecModel(nn.Module):
|
|
43 |
)
|
44 |
|
45 |
def forward(self, x):
|
46 |
-
x = self.processor(x, sampling_rate=16000, return_tensors="pt")["input_values"].squeeze(0)
|
47 |
x = self.encoder(x).last_hidden_state
|
48 |
x = torch.mean(x, dim=1)
|
49 |
logits = self.intent_classifier(x)
|
@@ -67,7 +67,7 @@ class HubertSSLModel(nn.Module):
|
|
67 |
)
|
68 |
|
69 |
def forward(self, x):
|
70 |
-
x = self.processor(x, sampling_rate=16000, return_tensors="pt")["input_values"].squeeze(0)
|
71 |
x = self.encoder(x).last_hidden_state
|
72 |
x = torch.mean(x, dim=1)
|
73 |
logits = self.intent_classifier(x)
|
|
|
43 |
)
|
44 |
|
45 |
def forward(self, x):
|
46 |
+
x = self.processor(x, sampling_rate=16000, return_tensors="pt")["input_values"].squeeze(0)
|
47 |
x = self.encoder(x).last_hidden_state
|
48 |
x = torch.mean(x, dim=1)
|
49 |
logits = self.intent_classifier(x)
|
|
|
67 |
)
|
68 |
|
69 |
def forward(self, x):
|
70 |
+
x = self.processor(x, sampling_rate=16000, return_tensors="pt")["input_values"].squeeze(0)
|
71 |
x = self.encoder(x).last_hidden_state
|
72 |
x = torch.mean(x, dim=1)
|
73 |
logits = self.intent_classifier(x)
|