Spaces:
Running
Running
Download index.html from Cdawg1/anycoder-e6fb1ddd: direct link, hf CLI and curl.
- Browser
- Download file 13.4 kB
-
https://huggingface.co/spaces/Cdawg1/anycoder-e6fb1ddd/resolve/main/index.html
- Command line
-
hf download hf://spaces/Cdawg1/anycoder-e6fb1ddd/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Cdawg1/anycoder-e6fb1ddd/resolve/main/index.html
13.4 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>AI Image Generator - Content Warning</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; | |
| box-sizing: border-box; | |
| } | |
| body { | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| align-items: center; | |
| justify-content: center; | |
| padding: 20px; | |
| } | |
| .container { | |
| background: rgba(255, 255, 255, 0.95); | |
| border-radius: 20px; | |
| padding: 40px; | |
| box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1); | |
| max-width: 800px; | |
| width: 100%; | |
| text-align: center; | |
| } | |
| .header { | |
| margin-bottom: 30px; | |
| } | |
| .header h1 { | |
| color: #333; | |
| font-size: 2.5rem; | |
| margin-bottom: 10px; | |
| font-weight: 700; | |
| } | |
| .header p { | |
| color: #666; | |
| font-size: 1.1rem; | |
| line-height: 1.6; | |
| } | |
| .warning-box { | |
| background: linear-gradient(135deg, #ff6b6b, #ee5a24); | |
| color: white; | |
| padding: 30px; | |
| border-radius: 15px; | |
| margin: 30px 0; | |
| box-shadow: 0 10px 30px rgba(255, 107, 107, 0.3); | |
| } | |
| .warning-box h2 { | |
| font-size: 1.8rem; | |
| margin-bottom: 15px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| gap: 10px; | |
| } | |
| .warning-icon { | |
| font-size: 2rem; | |
| animation: pulse 2s infinite; | |
| } | |
| @keyframes pulse { | |
| 0%, | |
| 100% { | |
| transform: scale(1); | |
| } | |
| 50% { | |
| transform: scale(1.1); | |
| } | |
| } | |
| .content-options { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); | |
| gap: 20px; | |
| margin: 30px 0; | |
| } | |
| .option-card { | |
| background: white; | |
| border-radius: 15px; | |
| padding: 25px; | |
| box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1); | |
| transition: transform 0.3s ease, box-shadow 0.3s ease; | |
| border: 2px solid transparent; | |
| cursor: pointer; | |
| } | |
| .option-card:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15); | |
| } | |
| .option-card.sfw { | |
| border-color: #4CAF50; | |
| } | |
| .option-card.nsfw { | |
| border-color: #f44336; | |
| } | |
| .option-icon { | |
| font-size: 3rem; | |
| margin-bottom: 15px; | |
| } | |
| .option-card h3 { | |
| color: #333; | |
| margin-bottom: 10px; | |
| font-size: 1.3rem; | |
| } | |
| .option-card p { | |
| color: #666; | |
| font-size: 0.95rem; | |
| line-height: 1.5; | |
| } | |
| .controls { | |
| margin: 30px 0; | |
| text-align: left; | |
| } | |
| .control-group { | |
| margin-bottom: 20px; | |
| } | |
| .control-group label { | |
| display: block; | |
| margin-bottom: 8px; | |
| color: #333; | |
| font-weight: 600; | |
| } | |
| .control-group input, | |
| .control-group select { | |
| width: 100%; | |
| padding: 12px; | |
| border: 2px solid #ddd; | |
| border-radius: 10px; | |
| font-size: 1rem; | |
| transition: border-color 0.3s ease; | |
| } | |
| .control-group input:focus, | |
| .control-group select:focus { | |
| outline: none; | |
| border-color: #667eea; | |
| } | |
| .generate-btn { | |
| background: linear-gradient(135deg, #667eea, #764ba2); | |
| color: white; | |
| border: none; | |
| padding: 15px 40px; | |
| font-size: 1.1rem; | |
| border-radius: 50px; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| font-weight: 600; | |
| margin: 20px 0; | |
| box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4); | |
| } | |
| .generate-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6); | |
| } | |
| .generate-btn:disabled { | |
| background: #ccc; | |
| cursor: not-allowed; | |
| transform: none; | |
| box-shadow: none; | |
| } | |
| .image-preview { | |
| margin: 30px 0; | |
| display: none; | |
| } | |
| .image-preview img { | |
| max-width: 100%; | |
| border-radius: 15px; | |
| box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); | |
| } | |
| .footer { | |
| margin-top: 30px; | |
| color: #666; | |
| font-size: 0.9rem; | |
| } | |
| .footer a { | |
| color: #667eea; | |
| text-decoration: none; | |
| font-weight: 600; | |
| } | |
| .footer a:hover { | |
| text-decoration: underline; | |
| } | |
| .age-verification { | |
| background: rgba(0, 0, 0, 0.8); | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| z-index: 1000; | |
| } | |
| .verification-box { | |
| background: white; | |
| padding: 40px; | |
| border-radius: 20px; | |
| text-align: center; | |
| max-width: 400px; | |
| width: 90%; | |
| } | |
| .verification-box h2 { | |
| color: #333; | |
| margin-bottom: 20px; | |
| } | |
| .verification-box p { | |
| color: #666; | |
| margin-bottom: 25px; | |
| line-height: 1.6; | |
| } | |
| .age-buttons { | |
| display: flex; | |
| gap: 15px; | |
| justify-content: center; | |
| } | |
| .age-btn { | |
| padding: 12px 30px; | |
| border: none; | |
| border-radius: 10px; | |
| font-size: 1rem; | |
| cursor: pointer; | |
| transition: all 0.3s ease; | |
| font-weight: 600; | |
| } | |
| .age-btn.yes { | |
| background: #f44336; | |
| color: white; | |
| } | |
| .age-btn.no { | |
| background: #4CAF50; | |
| color: white; | |
| } | |
| .age-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); | |
| } | |
| @media (max-width: 768px) { | |
| .container { | |
| padding: 20px; | |
| } | |
| .header h1 { | |
| font-size: 2rem; | |
| } | |
| .content-options { | |
| grid-template-columns: 1fr; | |
| } | |
| .age-buttons { | |
| flex-direction: column; | |
| } | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <div class="age-verification" id="ageVerification"> | |
| <div class="verification-box"> | |
| <h2>Age Verification Required</h2> | |
| <p>This application may generate content intended for adults only. You must be 18 years or older to proceed.</p> | |
| <div class="age-buttons"> | |
| <button class="age-btn yes" onclick="verifyAge(true)">I am 18 or older</button> | |
| <button class="age-btn no" onclick="verifyAge(false)">I am under 18</button> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="container" id="mainApp" style="display: none;"> | |
| <div class="header"> | |
| <h1>AI Image Generator</h1> | |
| <p>Create stunning images with artificial intelligence. Choose your content preferences below.</p> | |
| <p style="margin-top: 10px; font-size: 0.9rem; color: #888;">Built with <a | |
| href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a></p> | |
| </div> | |
| <div class="warning-box"> | |
| <h2> | |
| <span class="warning-icon">⚠️</span> | |
| Content Warning | |
| </h2> | |
| <p>This application includes options for generating NSFW (Not Safe For Work) content. Please use responsibly and | |
| ensure you are in an appropriate environment.</p> | |
| </div> | |
| <div class="content-options"> | |
| <div class="option-card sfw" onclick="selectOption('sfw')"> | |
| <div class="option-icon">🖼️</div> | |
| <h3>Safe Content Only</h3> | |
| <p>Generate family-friendly images including landscapes, animals, objects, and appropriate artwork.</p> | |
| </div> | |
| <div class="option-card nsfw" onclick="selectOption('nsfw')"> | |
| <div class="option-icon">🔞</div> | |
| <h3>NSFW Content</h3> | |
| <p>Generate adult content including artistic nudes, mature themes, and explicit material (18+ only).</p> | |
| </div> | |
| </div> | |
| <div class="controls"> | |
| <div class="control-group"> | |
| <label for="prompt">Image Description</label> | |
| <input type="text" id="prompt" placeholder="Describe the image you want to generate..." maxlength="200"> | |
| </div> | |
| <div class="control-group"> | |
| <label for="style">Art Style</label> | |
| <select id="style"> | |
| <option value="realistic">Realistic</option> | |
| <option value="anime">Anime</option> | |
| <option value="painting">Oil Painting</option> | |
| <option value="digital">Digital Art</option> | |
| <option value="photographic">Photographic</option> | |
| </select> | |
| </div> | |
| <div class="control-group"> | |
| <label for="quality">Image Quality</label> | |
| <select id="quality"> | |
| <option value="standard">Standard (512x512)</option> | |
| <option value="high">High (768x768)</option> | |
| <option value="ultra">Ultra HD (1024x1024)</option> | |
| </select> | |
| </div> | |
| </div> | |
| <button class="generate-btn" id="generateBtn" onclick="generateImage()" disabled> | |
| Generate Image | |
| </button> | |
| <div class="image-preview" id="imagePreview"> | |
| <img id="generatedImage" src="" alt="Generated image"> | |
| </div> | |
| <div class="footer"> | |
| <p><strong>Disclaimer:</strong> This is a demonstration interface. Actual image generation would require | |
| integration with AI services. Please respect content guidelines and use responsibly.</p> | |
| </div> | |
| </div> | |
| <script> | |
| let selectedOption = null; | |
| let isAgeVerified = false; | |
| function verifyAge(isAdult) { | |
| if (isAdult) { | |
| document.getElementById('ageVerification').style.display = 'none'; | |
| document.getElementById('mainApp').style.display = 'block'; | |
| isAgeVerified = true; | |
| } else { | |
| alert('You must be 18 or older to use this application. Redirecting to safe content...'); | |
| window.location.href = 'https://www.google.com'; | |
| } | |
| } | |
| function selectOption(option) { | |
| selectedOption = option; | |
| const cards = document.querySelectorAll('.option-card'); | |
| cards.forEach(card => card.style.transform = 'scale(1)'); | |
| if (option === 'sfw') { | |
| document.querySelector('.option-card.sfw').style.transform = 'scale(1.05)'; | |
| } else { | |
| document.querySelector('.option-card.nsfw').style.transform = 'scale(1.05)'; | |
| } | |
| document.getElementById('generateBtn').disabled = false; | |
| } | |
| function generateImage() { | |
| if (!selectedOption) { | |
| alert('Please select a content option first.'); | |
| return; | |
| } | |
| const prompt = document.getElementById('prompt').value; | |
| if (!prompt.trim()) { | |
| alert('Please enter an image description.'); | |
| return; | |
| } | |
| const style = document.getElementById('style').value; | |
| const quality = document.getElementById('quality').value; | |
| // Show loading state | |
| const btn = document.getElementById('generateBtn'); | |
| btn.innerHTML = 'Generating...'; | |
| btn.disabled = true; | |
| // Simulate API call delay | |
| setTimeout(() => { | |
| // This is a simulation - in a real application, you would call an AI image generation API | |
| const imagePreview = document.getElementById('imagePreview'); | |
| const generatedImage = document.getElementById('generatedImage'); | |
| // Create a placeholder image based on the selected options | |
| const canvas = document.createElement('canvas'); | |
| const ctx = canvas.getContext('2d'); | |
| canvas.width = 400; | |
| canvas.height = 400; | |
| // Background based on content type | |
| if (selectedOption === 'sfw') { | |
| ctx.fillStyle = '#4CAF50'; | |
| } else { | |
| ctx.fillStyle = '#f44336'; | |
| } | |
| ctx.fillRect(0, 0, 400, 400); | |
| // Text overlay | |
| ctx.fillStyle = 'white'; | |
| ctx.font = '20px Arial'; | |
| ctx.textAlign = 'center'; | |
| ctx.fillText('AI Generated Image', 200, 150); | |
| ctx.fillText(`Style: ${style}`, 200, 200); | |
| ctx.fillText(`Content: ${selectedOption.toUpperCase()}`, 200, 250); | |
| generatedImage.src = canvas.toDataURL(); | |
| imagePreview.style.display = 'block'; | |
| // Reset button | |
| btn.innerHTML = 'Generate Image'; | |
| btn.disabled = false; | |
| // Scroll to preview | |
| imagePreview.scrollIntoView({ behavior: 'smooth' }); | |
| console.log('Generation parameters:', { | |
| prompt, | |
| style, | |
| quality, | |
| contentType: selectedOption | |
| }); | |
| }, 2000); | |
| } | |
| // Enable generate button when prompt is entered | |
| document.getElementById('prompt').addEventListener('input', function() { | |
| if (this.value.trim() && selectedOption) { | |
| document.getElementById('generateBtn').disabled = false; | |
| } else { | |
| document.getElementById('generateBtn').disabled = true; | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |