srd4 commited on
Commit
ce691da
1 Parent(s): eb8830a

Update handler.py

Browse files
Files changed (1) hide show
  1. handler.py +1 -1
handler.py CHANGED
@@ -7,7 +7,7 @@ class EndpointHandler:
7
  # Set model size, assuming installation has been done with appropriate model files and setup
8
  model_size = "medium" if model_dir is None else model_dir
9
  # Change to 'cuda' to use the GPU, and set compute_type for faster computation
10
- self.model = WhisperModel(model_size, device="cuda", compute_type="fp16")
11
 
12
  def __call__(self, data: Dict) -> Dict[str, str]:
13
  # Process the input data expected to be in 'inputs' key containing audio file bytes
 
7
  # Set model size, assuming installation has been done with appropriate model files and setup
8
  model_size = "medium" if model_dir is None else model_dir
9
  # Change to 'cuda' to use the GPU, and set compute_type for faster computation
10
+ self.model = WhisperModel(model_size, device="cuda", compute_type="float16")
11
 
12
  def __call__(self, data: Dict) -> Dict[str, str]:
13
  # Process the input data expected to be in 'inputs' key containing audio file bytes