Grosy commited on
Commit
f511602
·
verified ·
1 Parent(s): 1ae2ca9

Device fixed to CPU

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -6,10 +6,10 @@ import librosa
6
 
7
  model_name = "Grosy/wav2vec2-base-hu"
8
 
9
- tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name)
10
- processor = Wav2Vec2Processor.from_pretrained(model_name)
11
- model = Wav2Vec2ForCTC.from_pretrained(model_name)
12
- model.to("cpu")
13
 
14
  max_seconds = 30
15
  # define function to read in sound file
@@ -68,7 +68,7 @@ pipe = pipeline(
68
  task="automatic-speech-recognition",
69
  model=model_name,
70
  chunk_length_s=10,
71
- device=device,
72
  )
73
 
74
  def transcribe(inputs):
 
6
 
7
  model_name = "Grosy/wav2vec2-base-hu"
8
 
9
+ #tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(model_name)
10
+ #processor = Wav2Vec2Processor.from_pretrained(model_name)
11
+ #model = Wav2Vec2ForCTC.from_pretrained(model_name)
12
+ #model.to("cpu")
13
 
14
  max_seconds = 30
15
  # define function to read in sound file
 
68
  task="automatic-speech-recognition",
69
  model=model_name,
70
  chunk_length_s=10,
71
+ device="cpu",
72
  )
73
 
74
  def transcribe(inputs):