Blaxzter commited on
Commit
ddd21c6
1 Parent(s): 0e093c5

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -12,7 +12,6 @@ class EndpointHandler:
12
 
13
  def __init__(self, asr_model_path: str = "./whisper-large-v2"):
14
  device = 0 if torch.cuda.is_available() else -1
15
- device = -1
16
  print("Using device:", device)
17
  # Create an ASR pipeline using the model located in the specified directory
18
  self.asr_pipeline = pipeline(
@@ -49,3 +48,4 @@ class EndpointHandler:
49
  json.dump(transcription, result)
50
 
51
  return result.getvalue()
 
 
12
 
13
  def __init__(self, asr_model_path: str = "./whisper-large-v2"):
14
  device = 0 if torch.cuda.is_available() else -1
 
15
  print("Using device:", device)
16
  # Create an ASR pipeline using the model located in the specified directory
17
  self.asr_pipeline = pipeline(
 
48
  json.dump(transcription, result)
49
 
50
  return result.getvalue()
51
+