SeyedAli commited on
Commit
2a4a8ca
1 Parent(s): 3283fcc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
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].to(device) for key in inputs}
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