PII-Masker / app /models.py
abishekcodes's picture
Deployment Test
98abe61
from pydantic import BaseModel, Field
from typing import List, Dict
class Entity(BaseModel):
text: str
label: str
location: List[Dict] = Field(..., description="Location data for each word in the entity.")
class AnalysisResponse(BaseModel):
filename: str
entities: List[Entity]
class RedactRequest(BaseModel):
entities_to_redact: List[Entity]