import os from PIL import Image from flask import Response, request from flask_restplus import Namespace, Resource from app.config import Config from app.apis.dtos.model import ModelDto from app.image.format import Format as ImageFormat from app.model.load import Loader as ModelLoader from app.model.type import Type as ModelType import numpy as np predict_namespace = Namespace('predict', description='predict operations') config = Config() config.load_config() def image_format(image_format): if image_format == 'GrayScale': return ImageFormat.GrayScale return ImageFormat(image_format) @predict_namespace.route("/") class Predict(Resource): def post(self): """ :return: """