toxic-detector/app/models/schemas.py

8 lines
261 B
Python

from pydantic import BaseModel, Field
class TextInput(BaseModel):
text: str = Field(..., example="Это просто пиииииииииииииииииииздец")
class ToxicityOutput(BaseModel):
toxicity_score: float = Field(..., example=0.85)