radames commited on
Commit
146fed7
·
1 Parent(s): 77e5f1a
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -16,14 +16,14 @@ MODEL = "facebook/wav2vec2-large-960h"
16
  # MODEL = "facebook/wav2vec2-base-960h"
17
  # MODEL = "patrickvonplaten/wav2vec2-large-960h-lv60-self-4-gram"
18
 
19
-
20
  speech_recognizer = pipeline(
21
  task="automatic-speech-recognition",
22
  model=f"{MODEL}",
23
  tokenizer=f"{MODEL}",
24
  framework="pt",
 
25
  )
26
- speech_recognizer.to("cuda")
27
 
28
  videos_out_path = Path("./videos_out")
29
  videos_out_path.mkdir(parents=True, exist_ok=True)
 
16
  # MODEL = "facebook/wav2vec2-base-960h"
17
  # MODEL = "patrickvonplaten/wav2vec2-large-960h-lv60-self-4-gram"
18
 
 
19
  speech_recognizer = pipeline(
20
  task="automatic-speech-recognition",
21
  model=f"{MODEL}",
22
  tokenizer=f"{MODEL}",
23
  framework="pt",
24
+ device="cuda",
25
  )
26
+
27
 
28
  videos_out_path = Path("./videos_out")
29
  videos_out_path.mkdir(parents=True, exist_ok=True)