Spaces:
Sleeping
Sleeping
File size: 1,861 Bytes
9ad819a 2d09f50 9ad819a 2d09f50 9ad819a 2d09f50 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 | ---
title: Privacy Filter Flask Demo
emoji: ๐
colorFrom: blue
colorTo: purple
sdk: docker
pinned: false
license: apache-2.0
short_description: Flask demo for OpenAI Privacy Filter PII detection model
---
# ๐ OpenAI Privacy Filter Flask Demo
A Flask-based web interface to demonstrate OpenAI's Privacy Filter model for detecting and masking Personally Identifiable Information (PII) in text.
## Model
**openai/privacy-filter** - A bidirectional token-classification model trained specifically for PII detection.
## Detects 8 Privacy Categories
| Category | Description | Example |
|----------|-------------|---------|
| `private_person` | Names of individuals | "Alice Smith", "John Doe" |
| `private_email` | Email addresses | "alice@example.com" |
| `private_phone` | Phone numbers | "(555) 123-4567" |
| `private_address` | Physical addresses | "123 Main Street, NYC" |
| `account_number` | Account/ID numbers | "Acct: 12345678" |
| `secret` | Secrets/credentials | Passwords, API keys, tokens |
| `private_url` | Personal URLs | Private links |
| `private_date` | Personal dates | Birthdays, dates of birth |
## Usage
Enter any text containing PII in the web interface and the model will:
1. **Highlight** detected PII entities with color coding
2. **Label** each entity by type
3. **Show confidence scores** for each detection
## Technical Details
- **Framework**: Flask
- **Model**: openai/privacy-filter (1.5B params, 50M active)
- **License**: Apache 2.0
- **Context Window**: 128,000 tokens
- **Architecture**: Bidirectional token classifier with Banded Attention
## Links
- [Model Card](https://huggingface.co/openai/privacy-filter)
- [OpenAI Privacy Filter GitHub](https://github.com/openai/privacy-filter)
- [Model Paper/Card PDF](https://cdn.openai.com/pdf/c66281ed-b638-456a-8ce1-97e9f5264a90/OpenAI-Privacy-Filter-Model-Card.pdf) |