Spaces:
Sleeping
Sleeping
| 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) |