Spaces:
Sleeping
Sleeping
File size: 346 Bytes
bbbfa2c 025084b 53b29e6 | 1 2 3 4 5 6 7 8 9 10 11 | 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)
|