Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,7 +22,8 @@ pipe = pipeline(
|
|
| 22 |
task="audio-classification",
|
| 23 |
model="onnx-community/ast-finetuned-audioset-10-10-0.4593-ONNX",
|
| 24 |
accelerator="ort", # Specifies to use ONNX Runtime ('ort')
|
| 25 |
-
device="cpu"
|
|
|
|
| 26 |
)
|
| 27 |
|
| 28 |
# Define the function to classify an audio file
|
|
|
|
| 22 |
task="audio-classification",
|
| 23 |
model="onnx-community/ast-finetuned-audioset-10-10-0.4593-ONNX",
|
| 24 |
accelerator="ort", # Specifies to use ONNX Runtime ('ort')
|
| 25 |
+
device="cpu", # Explicitly run on the CPU
|
| 26 |
+
feature_extractor_kwargs={"use_fast": True} # Silences the "slow processor" warning
|
| 27 |
)
|
| 28 |
|
| 29 |
# Define the function to classify an audio file
|