| from typing import Dict, Any | |
| import torch | |
| import base64 | |
| import io | |
| import os | |
| import json | |
| from PIL import Image | |
| from pipeline import Pipeline | |
| class EndpointHandler: | |
| def __init__(self, path=""): | |
| self.pipeline = Pipeline() | |
| def __call__(self, data: Dict[str, Any]) -> Dict[str, str]: | |
| return self.pipeline(data) | |