Skip to content

lukewarm3/SafePrompt

Repository files navigation

SafePrompt

A Chrome extension for safer ChatGPT workflows. It helps users detect and anonymize Personally Identifiable Information (PII) in text before sending prompts, and it also supports a local face-swap flow for uploaded images so users can preview privacy-preserving replacements before sharing them.

Setup Instructions

1. Install Dependencies

npm install

2. Development

npm run dev

This will watch for changes and rebuild automatically. After making changes:

  • Rebuild the extension (if not in watch mode)
  • Go to chrome://extensions/
  • Click the refresh icon on the extension card

3. Production Build

npm run build

This creates an optimized build in the dist/ folder.

4. Load Extension in Chrome

  1. Open Chrome and navigate to chrome://extensions/
  2. Enable "Developer mode" (toggle in top right)
  3. Click "Load unpacked"
  4. Select the dist/ folder from this project

Usage

  1. Navigate to ChatGPT: Open https://chatgpt.com and start typing a prompt
  2. Open Extension: Click the extension icon in Chrome's toolbar
  3. Detect PII: Click "Detect Private Information" to extract and analyze the text
  4. Review Tags: Words are displayed as buttons with color-coded tags:
    • Grey: "O" (Other - not private information)
    • Red: "NAME" (or other PII tags)
  5. Adjust Tags: Click any word button to change its tag using the dropdown menu
  6. Replace Text: Click "Replace" to replace detected PII with anonymized tags in the ChatGPT chatbox

Local Face Swap Flow

ImageTab now supports a localhost face-swap pipeline instead of browser-side face box detection.

  1. Extract the uploaded image from ChatGPT
  2. Choose a target face image in the SafePrompt side panel
  3. Run the local face-swap service
  4. Preview the swapped result
  5. Replace the uploaded ChatGPT image with the swapped preview

See local-face-swap/README.md for the local service setup, including how to download inswapper_128.onnx.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors