toxic-detector/app/models/schemas.py

8 lines
261 B
Python
Raw Normal View History

2024-10-22 22:51:03 +02:00
from pydantic import BaseModel, Field
class TextInput(BaseModel):
text: str = Field(..., example="Это просто пиииииииииииииииииииздец")
class ToxicityOutput(BaseModel):
toxicity_score: float = Field(..., example=0.85)