Update handler.py
Browse files- 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="
|
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="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
|