Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,7 @@
|
|
12 |
from transformers import pipeline
|
13 |
import torch
|
14 |
|
|
|
15 |
classifier = pipeline(
|
16 |
"audio-classification", model="MIT/ast-finetuned-speech-commands-v2", device=device
|
17 |
)
|
|
|
12 |
from transformers import pipeline
|
13 |
import torch
|
14 |
|
15 |
+
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
16 |
classifier = pipeline(
|
17 |
"audio-classification", model="MIT/ast-finetuned-speech-commands-v2", device=device
|
18 |
)
|