.generator-container { max-width: 500px; margin: 40px auto; padding: 20px; background: white; border-radius: 12px; box-shadow: 0 0 15px rgba(0,0,0,0.1); text-align: center; } #prompt-input { width: 100%; padding: 12px; margin-bottom: 12px; border: 1px solid #ccc; border-radius: 8px; resize: vertical; font-family: inherit; } #generate-btn { background-color: #6366f1; color: white; padding: 10px 20px; border: none; border-radius: 8px; cursor: pointer; } #generate-btn:hover { background-color: #4f46e5; } #result-container img { margin-top: 20px; max-width: 100%; border-radius: 8px; } - Initial Deployment
b0f709a verified Download index.html from ranemeo/roro: direct link, hf CLI and curl.
- Browser
- Download file 13.2 kB
-
https://huggingface.co/spaces/ranemeo/roro/resolve/main/index.html
- Command line
-
hf download hf://spaces/ranemeo/roro/index.html
-
curl -L -o index.html https://huggingface.co/spaces/ranemeo/roro/resolve/main/index.html
13.2 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Image Generator</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| .gradient-bg { | |
| background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%); | |
| } | |
| .result-placeholder { | |
| background: linear-gradient(45deg, #f3f4f6 25%, #e5e7eb 25%, #e5e7eb 50%, #f3f4f6 50%, #f3f4f6 75%, #e5e7eb 75%, #e5e7eb 100%); | |
| background-size: 20px 20px; | |
| } | |
| .prompt-input:focus { | |
| outline: none; | |
| box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3); | |
| } | |
| .loading-spinner { | |
| animation: spin 1s linear infinite; | |
| } | |
| @keyframes spin { | |
| 0% { transform: rotate(0deg); } | |
| 100% { transform: rotate(360deg); } | |
| } | |
| </style> | |
| </head> | |
| <body class="min-h-screen bg-gray-50"> | |
| <div class="container mx-auto px-4 py-8"> | |
| <div class="max-w-3xl mx-auto"> | |
| <!-- Header --> | |
| <header class="text-center mb-10"> | |
| <h1 class="text-4xl font-bold text-gray-800 mb-2">AI Image Generator</h1> | |
| <p class="text-gray-600">Transform your imagination into stunning visuals with AI</p> | |
| </header> | |
| <!-- Generator Card --> | |
| <div class="bg-white rounded-xl shadow-lg overflow-hidden transition-all duration-300 hover:shadow-xl"> | |
| <div class="gradient-bg p-4 text-white"> | |
| <h2 class="text-xl font-semibold flex items-center justify-center gap-2"> | |
| <i class="fas fa-magic"></i> Create Your Masterpiece | |
| </h2> | |
| </div> | |
| <div class="p-6"> | |
| <!-- Prompt Input --> | |
| <div class="mb-6"> | |
| <label for="prompt-input" class="block text-sm font-medium text-gray-700 mb-2"> | |
| Describe what you want to generate | |
| </label> | |
| <div class="relative"> | |
| <textarea | |
| id="prompt-input" | |
| rows="4" | |
| class="w-full px-4 py-3 border border-gray-300 rounded-lg prompt-input focus:border-indigo-500 transition-all duration-200" | |
| placeholder="A futuristic cityscape at sunset with flying cars and neon lights..." | |
| ></textarea> | |
| <div class="absolute bottom-3 right-3 text-gray-400 text-xs"> | |
| <span id="char-count">0</span>/200 | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Style Options --> | |
| <div class="mb-6"> | |
| <label class="block text-sm font-medium text-gray-700 mb-2">Art Style</label> | |
| <div class="grid grid-cols-2 sm:grid-cols-4 gap-3"> | |
| <button class="style-option bg-indigo-100 text-indigo-700 border-indigo-300" data-style="realistic"> | |
| <i class="fas fa-camera mr-2"></i> Realistic | |
| </button> | |
| <button class="style-option bg-pink-100 text-pink-700 border-pink-300" data-style="fantasy"> | |
| <i class="fas fa-dragon mr-2"></i> Fantasy | |
| </button> | |
| <button class="style-option bg-purple-100 text-purple-700 border-purple-300" data-style="anime"> | |
| <i class="fas fa-mask mr-2"></i> Anime | |
| </button> | |
| <button class="style-option bg-yellow-100 text-yellow-700 border-yellow-300" data-style="abstract"> | |
| <i class="fas fa-paint-brush mr-2"></i> Abstract | |
| </button> | |
| </div> | |
| </div> | |
| <!-- Generate Button --> | |
| <div class="flex justify-center"> | |
| <button id="generate-btn" class="gradient-bg text-white px-8 py-3 rounded-lg font-medium flex items-center gap-2 transition-all duration-300 hover:opacity-90 hover:shadow-lg transform hover:-translate-y-1"> | |
| <i class="fas fa-sparkles"></i> Generate Image | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Result Section --> | |
| <div id="result-container" class="mt-10"> | |
| <div class="bg-white rounded-xl shadow-lg overflow-hidden"> | |
| <div class="gradient-bg p-4 text-white"> | |
| <h2 class="text-xl font-semibold flex items-center justify-center gap-2"> | |
| <i class="fas fa-image"></i> Your Generated Image | |
| </h2> | |
| </div> | |
| <div class="p-6"> | |
| <!-- Placeholder/Result --> | |
| <div id="result-content" class="result-placeholder rounded-lg flex items-center justify-center h-64 sm:h-96"> | |
| <div class="text-center text-gray-500"> | |
| <i class="fas fa-image fa-3x mb-3"></i> | |
| <p>Your generated image will appear here</p> | |
| </div> | |
| </div> | |
| <!-- Loading State --> | |
| <div id="loading-state" class="hidden mt-6 text-center"> | |
| <div class="inline-block loading-spinner text-indigo-500 text-3xl mb-3"> | |
| <i class="fas fa-spinner"></i> | |
| </div> | |
| <p class="text-gray-600">Generating your image... This may take a moment</p> | |
| </div> | |
| <!-- Actions --> | |
| <div id="result-actions" class="hidden mt-6 flex flex-col sm:flex-row gap-3 justify-center"> | |
| <button class="bg-indigo-500 text-white px-4 py-2 rounded-lg flex items-center justify-center gap-2 hover:bg-indigo-600 transition"> | |
| <i class="fas fa-download"></i> Download | |
| </button> | |
| <button class="bg-green-500 text-white px-4 py-2 rounded-lg flex items-center justify-center gap-2 hover:bg-green-600 transition"> | |
| <i class="fas fa-share-alt"></i> Share | |
| </button> | |
| <button class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg flex items-center justify-center gap-2 hover:bg-gray-300 transition"> | |
| <i class="fas fa-redo"></i> Regenerate | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Tips Section --> | |
| <div class="mt-10 bg-indigo-50 rounded-lg p-6"> | |
| <h3 class="text-lg font-semibold text-indigo-800 mb-3 flex items-center gap-2"> | |
| <i class="fas fa-lightbulb"></i> Tips for better results | |
| </h3> | |
| <ul class="space-y-2 text-gray-700"> | |
| <li class="flex items-start gap-2"> | |
| <i class="fas fa-check-circle text-indigo-500 mt-1"></i> | |
| <span>Be specific with details (colors, objects, style)</span> | |
| </li> | |
| <li class="flex items-start gap-2"> | |
| <i class="fas fa-check-circle text-indigo-500 mt-1"></i> | |
| <span>Include artistic styles (e.g., "in the style of Van Gogh")</span> | |
| </li> | |
| <li class="flex items-start gap-2"> | |
| <i class="fas fa-check-circle text-indigo-500 mt-1"></i> | |
| <span>Add lighting conditions (sunset, neon, soft lighting)</span> | |
| </li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| document.addEventListener('DOMContentLoaded', function() { | |
| // Elements | |
| const promptInput = document.getElementById('prompt-input'); | |
| const generateBtn = document.getElementById('generate-btn'); | |
| const resultContent = document.getElementById('result-content'); | |
| const loadingState = document.getElementById('loading-state'); | |
| const resultActions = document.getElementById('result-actions'); | |
| const charCount = document.getElementById('char-count'); | |
| const styleOptions = document.querySelectorAll('.style-option'); | |
| let selectedStyle = 'realistic'; | |
| // Character count | |
| promptInput.addEventListener('input', function() { | |
| const count = this.value.length; | |
| charCount.textContent = count; | |
| if (count > 200) { | |
| charCount.classList.add('text-red-500'); | |
| } else { | |
| charCount.classList.remove('text-red-500'); | |
| } | |
| }); | |
| // Style selection | |
| styleOptions.forEach(option => { | |
| option.addEventListener('click', function() { | |
| // Remove active class from all options | |
| styleOptions.forEach(opt => { | |
| opt.classList.remove('border-2', 'font-semibold'); | |
| }); | |
| // Add active class to selected option | |
| this.classList.add('border-2', 'font-semibold'); | |
| selectedStyle = this.dataset.style; | |
| }); | |
| }); | |
| // Set first style as active by default | |
| styleOptions[0].classList.add('border-2', 'font-semibold'); | |
| // Generate button click | |
| generateBtn.addEventListener('click', function() { | |
| const prompt = promptInput.value.trim(); | |
| if (!prompt) { | |
| alert('Please enter a description for your image'); | |
| return; | |
| } | |
| if (prompt.length > 200) { | |
| alert('Description should be 200 characters or less'); | |
| return; | |
| } | |
| // Show loading state | |
| resultContent.innerHTML = ''; | |
| loadingState.classList.remove('hidden'); | |
| resultActions.classList.add('hidden'); | |
| // Simulate API call with timeout | |
| setTimeout(() => { | |
| // Hide loading state | |
| loadingState.classList.add('hidden'); | |
| // Show result (in a real app, this would be the actual image from the API) | |
| resultContent.innerHTML = ` | |
| <div class="relative w-full h-full"> | |
| <img src="https://source.unsplash.com/random/800x600/?${encodeURIComponent(prompt)}" | |
| alt="Generated image of ${prompt}" | |
| class="w-full h-full object-cover rounded-lg"> | |
| <div class="absolute inset-0 bg-black bg-opacity-20 flex items-center justify-center rounded-lg"> | |
| <span class="text-white bg-black bg-opacity-50 px-3 py-1 rounded-lg text-sm"> | |
| Example result - in a real app, this would be your AI-generated image | |
| </span> | |
| </div> | |
| </div> | |
| `; | |
| // Show actions | |
| resultActions.classList.remove('hidden'); | |
| }, 3000); | |
| }); | |
| }); | |
| </script> | |
| <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=ranemeo/roro" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body> | |
| </html> |