Asmit
Initial commit
9012453
---
title: DeceptivePatternDetector
emoji: 🐨
colorFrom: purple
colorTo: red
sdk: gradio
sdk_version: 5.46.0
app_file: app.py
pinned: false
license: cc-by-nc-4.0
---
# πŸ” Deceptive Pattern Detector
An AI-powered tool that analyzes website screenshots to detect potentially deceptive design patterns (also known as "dark patterns").
## πŸš€ Features
- **Image Upload**: Upload screenshots of websites for analysis
- **OCR Analysis**: Extracts text and UI elements from images
- **Element Detection**: Identifies buttons, checkboxes, and other interactive elements
- **AI Analysis**: Uses Google Gemini AI to classify potential deceptive patterns
- **Pattern Categories**: Detects various types including:
- Confirm-shaming
- Urgency manipulation
- Scarcity tactics
- Misdirection
- Privacy violations
- And more...
## πŸ“‹ How to Use
1. **Upload Image**: Take a screenshot of a website and upload it
2. **API Key**: Enter your Google Gemini API key ([Get one here](https://makersuite.google.com/app/apikey))
3. **Analyze**: Click the analyze button and wait for results
4. **Review**: Examine the detected patterns and explanations
## πŸ”§ Requirements
- Google Gemini API key for AI analysis
- Google Cloud Vision API credentials (optional, for enhanced OCR)
## πŸ› οΈ Technical Details
This tool combines:
- **Computer Vision**: For UI element detection
- **OCR**: For text extraction using Google Cloud Vision
- **AI Analysis**: Using Google Gemini for pattern classification
- **Rule-based Fallbacks**: For basic detection when AI is unavailable
## ⚠️ Disclaimer
This tool uses AI analysis and may not catch all deceptive patterns or may flag legitimate design elements. The results should be used as a supplementary guide and not as a definitive assessment.
## πŸ—οΈ Architecture
- **Frontend**: Gradio interface
- **Backend**: Python with simplified computer vision
- **AI**: Google Gemini for pattern analysis
- **Deployment**: HuggingFace Spaces compatible
## πŸ“„ License
MIT License - See LICENSE file for details.