text-to-video / handler.py
lysandre's picture
lysandre HF staff
Inference endpoint
dbab1c5
raw
history blame
298 Bytes
from transformers.tools import load_tool
class EndpointHandler:
def __init__(self, path=''):
self.tool = load_tool('huggingface-tools/text-to-video')
self.tool.setup()
def __call__(self, data):
inputs = data.pop("inputs", data)
return self.tool(**inputs)