|
Download README.md from Netrava/ai: direct link, hf CLI and curl.
- Browser
- Download file 4.34 kB
-
https://huggingface.co/spaces/Netrava/ai/resolve/main/README.md
- Command line
-
hf download hf://spaces/Netrava/ai/README.md
-
curl -L -o README.md https://huggingface.co/spaces/Netrava/ai/resolve/main/README.md
4.34 kB
| title: Netrava UI Detection | |
| emoji: ๐ค | |
| colorFrom: blue | |
| colorTo: purple | |
| sdk: gradio | |
| sdk_version: 4.44.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # ๐ค Netrava UI Detection | |
| This Hugging Face Space hosts the Netrava AI Assistant's UI detection model for automatic UI element recognition. | |
| ## ๐ Quick Start | |
| 1. **Upload a screenshot** of any application | |
| 2. **Get instant detection** of UI elements | |
| 3. **Download annotated image** with bounding boxes | |
| 4. **Use via API** for integration | |
| ## ๐ฏ Supported UI Elements | |
| | Element Type | Description | Use Case | | |
| |--------------|-------------|----------| | |
| | ๐ **Buttons** | Clickable buttons | Navigation, actions | | |
| | ๐ **Text boxes** | Input fields | Data entry | | |
| | ๐ **Dropdowns** | Selection menus | Options, choices | | |
| | โ๏ธ **Checkboxes** | Toggle options | Settings, selections | | |
| | ๐จ **Icons** | Visual symbols | Quick actions | | |
| | ๐ **Menus** | Navigation menus | App navigation | | |
| | ๐ช **Windows** | Application windows | Window management | | |
| | ๐ฌ **Dialogs** | Modal dialogs | User interactions | | |
| | ๐ **Links** | Clickable links | Web navigation | | |
| | ๐ผ๏ธ **Images** | Visual content | Media elements | | |
| | ๐ท๏ธ **Labels** | Text labels | Information display | | |
| | ๐ **Tabs** | Tab controls | Content organization | | |
| | ๐ ๏ธ **Toolbars** | Tool collections | Quick access | | |
| | ๐ **Status bars** | Status information | System feedback | | |
| | ๐ **Scroll bars** | Scrolling controls | Content navigation | | |
| ## ๐ API Integration | |
| ### Basic Usage | |
| ```python | |
| import requests | |
| # Upload and detect | |
| response = requests.post( | |
| "https://your-username-netrava-ui-detection.hf.space/api/predict", | |
| files={"data": open("screenshot.png", "rb")} | |
| ) | |
| result = response.json() | |
| print(f"Detected {len(result['detections'])} UI elements") | |
| ``` | |
| ### Advanced Usage with Netrava Client | |
| ```python | |
| from netrava_client import NetravaCloudClient | |
| # Initialize client | |
| client = NetravaCloudClient("https://your-username-netrava-ui-detection.hf.space") | |
| # Detect elements | |
| detections = client.detect_ui_elements("screenshot.png") | |
| # Get annotated image | |
| annotated = client.detect_and_annotate("screenshot.png", "result.png") | |
| ``` | |
| ## โ๏ธ Configuration for Netrava | |
| Add this to your Netrava `config.json`: | |
| ```json | |
| { | |
| "cloud": { | |
| "enabled": true, | |
| "api_url": "https://your-username-netrava-ui-detection.hf.space", | |
| "fallback_local": true, | |
| "timeout": 30, | |
| "provider": "huggingface" | |
| } | |
| } | |
| ``` | |
| ## ๐ฎ Model Details | |
| - **Architecture**: YOLOv8 Nano (optimized for speed) | |
| - **Training Data**: Custom UI screenshots dataset | |
| - **Classes**: 15 UI element types | |
| - **Input Size**: 640x640 pixels | |
| - **Inference Time**: ~0.5-2 seconds | |
| - **Accuracy**: 90%+ on UI elements | |
| ## ๐ Response Format | |
| ```json | |
| { | |
| "success": true, | |
| "detections": [ | |
| { | |
| "class": "button", | |
| "confidence": 0.95, | |
| "bbox": [100, 50, 200, 80], | |
| "center": [150, 65], | |
| "size": [100, 30] | |
| } | |
| ], | |
| "count": 1 | |
| } | |
| ``` | |
| ## ๐ Performance | |
| | Metric | Value | | |
| |--------|-------| | |
| | **Inference Speed** | 0.5-2s | | |
| | **Accuracy** | 90%+ | | |
| | **Supported Formats** | PNG, JPG, JPEG | | |
| | **Max Image Size** | 10MB | | |
| | **Concurrent Users** | Unlimited (free tier) | | |
| ## ๐ ๏ธ Troubleshooting | |
| ### Common Issues | |
| **"Space is sleeping"** | |
| - Free tier sleeps after inactivity | |
| - First request takes ~30s to wake up | |
| - Subsequent requests are fast | |
| **"Detection failed"** | |
| - Check image format (PNG/JPG) | |
| - Ensure image size < 10MB | |
| - Verify image contains UI elements | |
| **"API timeout"** | |
| - Increase timeout in config | |
| - Check internet connection | |
| - Try smaller image size | |
| ### Error Codes | |
| | Code | Meaning | Solution | | |
| |------|---------|----------| | |
| | 500 | Model error | Check image format | | |
| | 413 | File too large | Reduce image size | | |
| | 429 | Rate limited | Wait and retry | | |
| ## ๐ Support | |
| - **Documentation**: [Netrava GitHub](https://github.com/your-username/netrava) | |
| - **Issues**: Report on GitHub Issues | |
| - **Community**: Hugging Face Discussions | |
| ## ๐ License | |
| MIT License - Free for commercial and personal use. | |
| --- | |
| **๐ Ready to revolutionize UI automation with AI-powered element detection!** | |