whisper-model-internal / test-handler.py
keess's picture
- add custom endpoint handler
3e6a512
from handler import EndpointHandler
from pathlib import Path
p = Path(__file__).with_name('pytorch_model.bin')
filename = p.absolute()
my_handler = EndpointHandler(path=filename)
payload = {"inputs": "contact.wav"}
transcription=my_handler(payload)
print("here is the transcription")
print(transcription)