PII Marking Quick Test
sentence
-
original_text
-
from fastapi import FastAPI from fastapi.responses import HTMLResponse from pydantic import BaseModel, Field from test_model import mark_pii_context class MarkRequest(BaseModel): text: str = Field(..., min_length=1, description="Input text to tag PII") class MarkResponse(BaseModel): sentence: str original_text: str entities: list[dict] context: str app = FastAPI(title="PII Marking API", version="1.0.0") @app.get("/", response_class=HTMLResponse) def test_page() -> str: return """