nsajadi commited on
Commit
71492f1
1 Parent(s): 1c3c766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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
  )