Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def SER(audio):
|
|
26 |
resampler = torchaudio.transforms.Resample(_sampling_rate)
|
27 |
speech = resampler(speech_array).squeeze().numpy()
|
28 |
inputs = feature_extractor(speech, sampling_rate=sampling_rate, return_tensors="pt", padding=True)
|
29 |
-
inputs = {key: inputs[key]
|
30 |
|
31 |
with torch.no_grad():
|
32 |
logits = model(**inputs).logits
|
|
|
26 |
resampler = torchaudio.transforms.Resample(_sampling_rate)
|
27 |
speech = resampler(speech_array).squeeze().numpy()
|
28 |
inputs = feature_extractor(speech, sampling_rate=sampling_rate, return_tensors="pt", padding=True)
|
29 |
+
inputs = {key: inputs[key] for key in inputs}
|
30 |
|
31 |
with torch.no_grad():
|
32 |
logits = model(**inputs).logits
|