khang119966 commited on
Commit
b5d5932
·
verified ·
1 Parent(s): 6ffa911

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -241,7 +241,7 @@ function forceLightTheme() {
241
  """
242
  from transformers import pipeline
243
 
244
- pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo")
245
 
246
  def transcribe_speech(filepath):
247
  output = pipe(
@@ -252,7 +252,6 @@ def transcribe_speech(filepath):
252
  },
253
  chunk_length_s=30,
254
  batch_size=1,
255
- device=0,
256
  )
257
  return output["text"]
258
 
 
241
  """
242
  from transformers import pipeline
243
 
244
+ pipe = pipeline("automatic-speech-recognition", model="openai/whisper-large-v3-turbo", torch_dtype=torch.float16, device="cuda:0")
245
 
246
  def transcribe_speech(filepath):
247
  output = pipe(
 
252
  },
253
  chunk_length_s=30,
254
  batch_size=1,
 
255
  )
256
  return output["text"]
257