Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -32,7 +32,7 @@ if uploaded_file is not None:
|
|
| 32 |
audio_input, sampling_rate = sf.read(uploaded_file)
|
| 33 |
|
| 34 |
# Preprocess audio input
|
| 35 |
-
inputs = feature_extractor(audio_input, sampling_rate=
|
| 36 |
inputs = {key: value.to('cuda' if torch.cuda.is_available() else 'cpu') for key, value in inputs.items()}
|
| 37 |
|
| 38 |
# Get prediction
|
|
|
|
| 32 |
audio_input, sampling_rate = sf.read(uploaded_file)
|
| 33 |
|
| 34 |
# Preprocess audio input
|
| 35 |
+
inputs = feature_extractor(audio_input, sampling_rate=16000, return_tensors="pt", padding=True)
|
| 36 |
inputs = {key: value.to('cuda' if torch.cuda.is_available() else 'cpu') for key, value in inputs.items()}
|
| 37 |
|
| 38 |
# Get prediction
|