Authentica / structure.py
MAS-AI-0000's picture
Update structure.py
53b29e6 verified
raw
history blame
346 Bytes
from pydantic import BaseModel, Field
from typing import List
class TextPredictionRequest(BaseModel):
text: str = Field(..., example="This is a sample text to classify")
class PredictionResponse(BaseModel):
predicted_class: int = Field(..., description="0 = Real, 1 = AI", example=0)
confidence: float = Field(..., ge=0.0, le=1.0)