Update handler.py
Browse files- handler.py +3 -3
handler.py
CHANGED
@@ -23,9 +23,9 @@ class EndpointHandler:
|
|
23 |
|
24 |
def __call__(self, data: Any) -> List[Dict[str, str]]:
|
25 |
print('==========NEW PROCESS=========')
|
26 |
-
|
27 |
-
|
28 |
-
result =
|
29 |
|
30 |
|
31 |
#print(f"{data}")
|
|
|
23 |
|
24 |
def __call__(self, data: Any) -> List[Dict[str, str]]:
|
25 |
print('==========NEW PROCESS=========')
|
26 |
+
transcribe = pipeline(task="automatic-speech-recognition", model="vasista22/whisper-kannada-tiny", chunk_length_s=30, device=device)
|
27 |
+
transcribe.model.config.forced_decoder_ids = transcribe.tokenizer.get_decoder_prompt_ids(language="ko", task="transcribe")
|
28 |
+
result = transcribe(data['inputs'])
|
29 |
|
30 |
|
31 |
#print(f"{data}")
|