diffsketcher / handler.py
jree423's picture
Upload diffsketcher model
13ea232 verified
raw
history blame
341 Bytes
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)