Download editor.html from zaidmaga/undefined: direct link, hf CLI and curl.
- Browser
- Download file 15.7 kB
-
https://huggingface.co/spaces/zaidmaga/undefined/resolve/main/editor.html
- Command line
-
hf download hf://spaces/zaidmaga/undefined/editor.html
-
curl -L -o editor.html https://huggingface.co/spaces/zaidmaga/undefined/resolve/main/editor.html
15.7 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Photo Editor - PixelWizard</title> | |
| <link rel="icon" type="image/x-icon" href="/static/favicon.ico"> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script> | |
| <script src="https://unpkg.com/feather-icons"></script> | |
| <style> | |
| @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap'); | |
| body { | |
| font-family: 'Inter', sans-serif; | |
| } | |
| .editor-bg { | |
| background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%); | |
| } | |
| .glass-panel { | |
| background: rgba(255, 255, 255, 0.08); | |
| backdrop-filter: blur(15px); | |
| border: 1px solid rgba(255, 255, 255, 0.15); | |
| } | |
| .tool-button { | |
| transition: all 0.3s ease; | |
| } | |
| .tool-button:hover { | |
| background: rgba(255, 255, 255, 0.15); | |
| transform: translateY(-2px); | |
| } | |
| .slider-track { | |
| background: rgba(255, 255, 255, 0.2); | |
| } | |
| .slider-thumb { | |
| background: #fff; | |
| box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3); | |
| } | |
| .preview-container { | |
| background: rgba(0, 0, 0, 0.3); | |
| border-radius: 12px; | |
| } | |
| </style> | |
| </head> | |
| <body class="min-h-screen editor-bg text-white"> | |
| <!-- Navigation --> | |
| <nav class="glass-panel rounded-2xl mx-4 mt-4 md:mx-8"> | |
| <div class="container mx-auto px-6 py-4"> | |
| <div class="flex items-center justify-between"> | |
| <div class="flex items-center space-x-3"> | |
| <a href="index.html" class="flex items-center space-x-2"> | |
| <div class="w-6 h-6 bg-white rounded-full flex items-center justify-center"> | |
| <i data-feather="arrow-left" class="text-blue-600 w-3 h-3"></i> | |
| </div> | |
| <span class="text-lg font-semibold">PixelWizard Editor</span> | |
| </a> | |
| </div> | |
| <div class="flex items-center space-x-4"> | |
| <button class="px-4 py-2 glass-panel rounded-lg hover:bg-white/10 transition-colors"> | |
| <i data-feather="save" class="w-4 h-4"></i> | |
| Save | |
| </button> | |
| <button class="px-4 py-2 bg-white text-blue-600 rounded-lg font-semibold hover:bg-blue-50 transition-colors"> | |
| <i data-feather="download" class="w-4 h-4"></i> | |
| Export | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Main Editor Layout --> | |
| <div class="container mx-auto px-4 py-8"> | |
| <div class="grid lg:grid-cols-4 gap-6"> | |
| <!-- Left Sidebar - Tools --> | |
| <div class="lg:col-span-1"> | |
| <div class="glass-panel rounded-2xl p-6"> | |
| <h3 class="text-lg font-semibold mb-4">AI Tools</h3> | |
| <div class="space-y-3"> | |
| <div class="tool-button glass-panel rounded-xl p-4 flex items-center space-x-3 cursor-pointer"> | |
| <i data-feather="zap" class="w-5 h-5 text-yellow-400"></i> | |
| <span>Enhance Quality</span> | |
| </div> | |
| <div class="tool-button glass-panel rounded-xl p-4 flex items-center space-x-3 cursor-pointer"> | |
| <i data-feather="edit-3" class="w-5 h-5 text-green-400"></i> | |
| <span>Style Transfer</span> | |
| </div> | |
| <div class="tool-button glass-panel rounded-xl p-4 flex items-center space-x-3 cursor-pointer"> | |
| <i data-feather="image" class="w-5 h-5 text-purple-400"></i> | |
| <span>Background Change</span> | |
| </div> | |
| <div class="tool-button glass-panel rounded-xl p-4 flex items-center space-x-3 cursor-pointer"> | |
| <i data-feather="sparkles" class="w-5 h-5 text-pink-400"></i> | |
| <span>Magic AI Effects</span> | |
| </div> | |
| <div class="tool-button glass-panel rounded-xl p-4 flex items-center space-x-3 cursor-pointer"> | |
| <i data-feather="cpu" class="w-5 h-5 text-blue-400"></i> | |
| <span>Advanced Diffusion</span> | |
| </div> | |
| </div> | |
| <h3 class="text-lg font-semibold mt-8 mb-4">AI Models</h3> | |
| <div class="space-y-2"> | |
| <label class="flex items-center space-x-3 p-3 rounded-lg hover:bg-white/5 cursor-pointer"> | |
| <input type="radio" name="model" class="text-blue-500" checked> | |
| <span>Flux 1.0 Pro</span> | |
| </label> | |
| <label class="flex items-center space-x-3 p-3 rounded-lg hover:bg-white/5 cursor-pointer"> | |
| <input type="radio" name="model" class="text-blue-500"> | |
| <span>Stable Diffusion XL</span> | |
| </label> | |
| <label class="flex items-center space-x-3 p-3 rounded-lg hover:bg-white/5 cursor-pointer"> | |
| <input type="radio" name="model" class="text-blue-500"> | |
| <span>DALL-E Enhanced</span> | |
| </label> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Center - Image Preview --> | |
| <div class="lg:col-span-2"> | |
| <div class="glass-panel rounded-2xl p-6 h-full"> | |
| <div class="flex justify-between items-center mb-6"> | |
| <h3 class="text-lg font-semibold">Image Preview</h3> | |
| <div class="flex space-x-2"> | |
| <button class="p-2 rounded-lg glass-panel hover:bg-white/10"> | |
| <i data-feather="zoom-in" class="w-4 h-4"></i> | |
| </button> | |
| <button class="p-2 rounded-lg glass-panel hover:bg-white/10"> | |
| <i data-feather="rotate-cw" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| <div class="preview-container p-4 flex items-center justify-center min-h-96" id="image-preview"> | |
| <div class="text-center" id="placeholder-content"> | |
| <i data-feather="image" class="w-16 h-16 mx-auto mb-4 text-blue-200"></i> | |
| <p class="text-blue-200">Upload an image to start editing</p> | |
| </div> | |
| </div> | |
| <!-- Processing Controls --> | |
| <div class="mt-6 space-y-4"> | |
| <div> | |
| <label class="block text-sm font-medium mb-2">AI Strength</label> | |
| <div class="slider-track rounded-full h-2 relative"> | |
| <div class="slider-thumb w-4 h-4 rounded-full absolute -mt-1 cursor-pointer" style="left: 50%;"></div> | |
| </div> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-2">Creativity Level</label> | |
| <div class="slider-track rounded-full h-2 relative"> | |
| <div class="slider-thumb w-4 h-4 rounded-full absolute -mt-1 cursor-pointer" style="left: 70%;"></div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Right Sidebar - Settings --> | |
| <div class="lg:col-span-1"> | |
| <div class="glass-panel rounded-2xl p-6"> | |
| <h3 class="text-lg font-semibold mb-4">Settings</h3> | |
| <div class="space-y-4"> | |
| <div> | |
| <label class="block text-sm font-medium mb-2">Prompt Enhancement</label> | |
| <textarea class="w-full glass-panel rounded-xl p-3 text-sm resize-none" placeholder="Describe the changes you want...">A young woman stands in the middle of a lively street, holding a microphone and singing her heart out. The warm glow of the sunset reflects on the faces of the crowd gathered around her...</textarea> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-2">Output Resolution</label> | |
| <select class="w-full glass-panel rounded-xl p-3 text-sm"> | |
| <option>Original Size</option> | |
| <option>1024x1024</option> | |
| <option>2048x2048</option> | |
| </select> | |
| </div> | |
| <div> | |
| <label class="block text-sm font-medium mb-2">Processing Steps</label> | |
| <div class="flex items-center space-x-3"> | |
| <button class="p-2 rounded-lg glass-panel hover:bg-white/10"> | |
| <i data-feather="minus" class="w-4 h-4"></i> | |
| </button> | |
| <span class="font-medium">20</span> | |
| <button class="p-2 rounded-lg glass-panel hover:bg-white/10"> | |
| <i data-feather="plus" class="w-4 h-4"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="pt-4"> | |
| <button class="w-full py-3 bg-gradient-to-r from-blue-500 to-purple-600 rounded-xl font-semibold hover:opacity-90 transition-opacity"> | |
| <i data-feather="play" class="w-4 h-4 inline mr-2"></i> | |
| Process Image | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Processing Overlay --> | |
| <div id="processing-overlay" class="fixed inset-0 bg-black/50 flex items-center justify-center z-50 hidden"> | |
| <div class="glass-panel rounded-2xl p-8 text-center max-w-md"> | |
| <div class="w-16 h-16 border-4 border-blue-500 border-t-transparent rounded-full animate-spin mx-auto mb-4"></div> | |
| <h3 class="text-xl font-semibold mb-2">AI Processing</h3> | |
| <p class="text-blue-200 mb-4">Our AI is transforming your image...</p> | |
| <div class="w-full bg-white/20 rounded-full h-2"> | |
| <div class="bg-blue-400 h-2 rounded-full" style="width: 45%"></div> | |
| </div> | |
| </div> | |
| <script> | |
| // Initialize Feather Icons | |
| feather.replace(); | |
| // Load uploaded image or sample image | |
| document.addEventListener('DOMContentLoaded', function() { | |
| const urlParams = new URLSearchParams(window.location.search); | |
| const isSample = urlParams.get('sample'); | |
| const uploadedImage = sessionStorage.getItem('uploadedImage'); | |
| if (uploadedImage) { | |
| displayImage(uploadedImage); | |
| sessionStorage.removeItem('uploadedImage'); | |
| } else if (isSample) { | |
| displaySampleImage(); | |
| } | |
| }); | |
| function displayImage(imageData) { | |
| const previewContainer = document.getElementById('image-preview'); | |
| const placeholder = document.getElementById('placeholder-content'); | |
| if (placeholder) { | |
| placeholder.style.display = 'none'; | |
| } | |
| previewContainer.innerHTML = ` | |
| <img src="${imageData}" alt="Uploaded Image" class="rounded-xl max-w-full max-h-80 object-contain"> | |
| `; | |
| } | |
| function displaySampleImage() { | |
| const previewContainer = document.getElementById('image-preview'); | |
| const placeholder = document.getElementById('placeholder-content'); | |
| if (placeholder) { | |
| placeholder.style.display = 'none'; | |
| } | |
| previewContainer.innerHTML = ` | |
| <img src="http://static.photos/people/640x360/123" alt="Sample Image" class="rounded-xl max-w-full max-h-80 object-contain"> | |
| `; | |
| } | |
| // Simple processing simulation | |
| document.querySelector('button:contains("Process Image")').addEventListener('click', function() { | |
| const overlay = document.getElementById('processing-overlay'); | |
| overlay.classList.remove('hidden'); | |
| setTimeout(() => { | |
| overlay.classList.add('hidden'); | |
| // Show success message | |
| const preview = document.querySelector('.preview-container'); | |
| preview.innerHTML = ` | |
| <img src="http://static.photos/technology/640x360/42" alt="Processed Image" class="rounded-xl max-w-full"> | |
| `; | |
| }, 3000); | |
| // Tool selection | |
| document.querySelectorAll('.tool-button').forEach(button => { | |
| button.addEventListener('click', function() { | |
| document.querySelectorAll('.tool-button').forEach(btn => { | |
| btn.classList.remove('bg-white/20'); | |
| }); | |
| this.classList.add('bg-white/20'); | |
| }); | |
| }); | |
| // Slider functionality | |
| document.querySelectorAll('.slider-track').forEach(track => { | |
| const thumb = track.querySelector('.slider-thumb'); | |
| thumb.addEventListener('mousedown', function(e) { | |
| e.preventDefault(); | |
| const trackRect = track.getBoundingClientRect(); | |
| const moveHandler = (e) => { | |
| const x = Math.max(0, Math.min(e.clientX - trackRect.left, trackRect.width)); | |
| const percentage = (x / trackRect.width) * 100; | |
| thumb.style.left = percentage + '%'; | |
| }; | |
| const upHandler = () => { | |
| document.removeEventListener('mousemove', moveHandler); | |
| document.removeEventListener('mouseup', upHandler); | |
| }; | |
| document.addEventListener('mousemove', moveHandler); | |
| document.addEventListener('mouseup', upHandler); | |
| }); | |
| }); | |
| </script> | |
| </body> | |
| </html> | |