toxic-detector/app/models/schemas.py

10 lines
286 B
Python
Raw Normal View History

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