saskarkhadka's picture
restructure and add telemtry
9766e10
Raw History Blame Contribute Delete
707 Bytes
from pydantic import BaseModel, Field
from enum import Enum
class MLModel(str, Enum):
naivebayes = "naivebayes"
gradientboost = "gradientboost"
xgboost = "xgboost"
class NeuralModel(str, Enum):
bilstm = "bilstm"
bert = "bert"
mlp = "mlp"
class ClassificationModel(str, Enum):
bilstm = "bilstm"
bert = "bert"
mlp = "mlp"
naivebayes = "naivebayes"
gradientboost = "gradientboost"
xgboost = "xgboost"
class ClassificationRequest(BaseModel):
text: str
model: ClassificationModel = Field(default=ClassificationModel.mlp)
class InferenceResult(BaseModel):
prediction: str
class ClassificationResponse(InferenceResult):
pass