Restricting Exposed Data by Anonymization for Confidential Transmission
🔐 An Electron-based desktop app to redact sensitive PII from text documents and clipboard content using the Hugging Face Inference API, with a preview and restore-friendly workflow.
- 🧠 Redacts PII using Hugging Face's
dslim/bert-base-NER
model (NER-based) - ✍️ Inline editing of redacted content
- 📋 Clipboard redaction/restoration with one click
- 📂 Drag-and-drop file support for
.txt
,.pdf
,.doc
,.docx
- 🔔 Popup alerts and feedback
- 📄 Generates
-REDACTED
clones while preserving original format
-
Clone the Repository
git clone https://github.com/KarthikBalaji-007/REDACT V2.git cd Freshathon
-
Install Dependencies
npm install
-
Configure Hugging Face API
- Create a
.env
file in the root folder - Add your API key like this:
HUGGINGFACE_API_KEY=your_api_key_here
- Create a
-
Run the App
npm start
Click Redact Clipboard
→ Detected PII is replaced with tags → Displayed in new window
Click Restore Clipboard
→ Original content restored from mapping → Displayed in new window
Drag-and-drop .txt
, .pdf
, .doc
, or .docx
→ Redacted version shown → Saved with -REDACTED
suffix
Click on redacted tags to manually edit or restore
This app uses the dslim/bert-base-NER
model from Hugging Face’s Inference API for redaction.
It offers good baseline coverage but may occasionally miss certain entities.
Always review output before sharing externally.
Check the examples/
folder for sample input/output:
example_data.txt
– Sample input textexample_data.txt-REDACTED.txt
– Redacted versionexample_data.pdf
– Sample PDFexample_data.pdf-REDACTED.txt
– Redacted output in plain text
🌟 Feel free to fork, star, and contribute to make R.E.D.A.C.T. even better!