Building Web Apps with Privacy Filter
Key point
Three web apps applying OpenAI's Privacy Filter and how to use gradio.Server were introduced.
Details
OpenAI released Privacy Filter on the Hugging Face Hub, and based on it, three web apps for documents, images, and text were introduced.
The model is an Apache 2.0-licensed PII detection model with 1.5B parameters (50M active), processing 8 categories (private_person, private_address, private_email, private_phone, private_url, private_date, account_number, secret) in a single forward pass with a 128k context. BIOES decoding keeps span boundaries stable even in long sentences, and the post introduces it as SOTA on PII-Masking-300k.
- Document Privacy Explorer: Reads an entire PDF/DOCX at once, highlights PII spans over the original text, and provides sidebar filters and a summary dashboard.
- Image Anonymizer: Aligns character positions with Tesseract OCR, then covers detected PII with black bars, allowing direct annotation/editing on the canvas before downloading.
- SmartRedact Paste: Replaces pasted text with placeholders like
<PRIVATE_PERSON>,<PRIVATE_EMAIL>,<ACCOUNT_NUMBER>, separating public URLs from reveal URLs that require a token.
All three apps commonly use gradio.Server. Model calls are queued via @server.api, while static pages and lookup routes are separated as regular FastAPI endpoints. The structure has the browser and gradio_client share the same API, reducing duplicate implementation.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.