Spaces:
Running
Running
Upload folder using huggingface_hub
Browse files12345678910111213141516171819123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620<!doctype html><html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <link rel="stylesheet" href="style.css" /> </head> <body> <div class="card"> <h1>Welcome to your static Space!</h1> <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p> <p> Also don't forget to check the <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>. </p> </div> </body></html><!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>NSFW Image to Video AI Bot</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> <style> :root { --primary-color: #8b5cf6; --primary-dark: #7c3aed; --secondary-color: #f43f5e; --dark-bg: #0f0f23; --darker-bg: #090915; --card-bg: #1a1a2e; --text-color: #e2e8f0; --text-muted: #94a3b8; --success-color: #10b981; --warning-color: #f59e0b; --border-radius: 12px; --transition: all 0.3s ease; }
* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; }
body { background: linear-gradient(135deg, var(--darker-bg) 0%, var(--dark-bg) 100%); color: var(--text-color); min-height: 100vh; line-height: 1.6; }
.header { background: rgba(15, 15, 35, 0.8); backdrop-filter: blur(10px); padding: 1rem 2rem; border-bottom: 1px solid rgba(139, 92, 246, 0.3); position: sticky; top: 0; z-index: 100; display: flex; justify-content: space-between; align-items: center; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-size: 1.5rem; font-weight: 700; color: var(--text-color); }
.logo i { color: var(--primary-color); }
.anycoder-link { color: var(--text-muted); font-size: 0.9rem; text-decoration: none; transition: var(--transition); }
.anycoder-link:hover { color: var(--primary-color); }
.container { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.hero { text-align: center; margin-bottom: 3rem; padding: 2rem; background: rgba(26, 26, 46, 0.5); border-radius: var(--border-radius); border: 1px solid rgba(139, 92, 246, 0.2); }
.hero h1 { font-size: 2.5rem; margin-bottom: 1rem; background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { font-size: 1.1rem; color: var(--text-muted); max-width: 700px; margin: 0 auto 2rem; }
.content { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; }
@media (max-width: 768px) { .content { grid-template-columns: 1fr; } }
.upload-section, .preview-section { background: var(--card-bg); border-radius: var(--border-radius); padding: 2rem; border: 1px solid rgba(139, 92, 246, 0.2); box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3); }
.section-title { font-size: 1.5rem; margin-bottom: 1.5rem; display: flex; align-items: center; gap: 0.75rem; color: var(--primary-color); }
.upload-area { border: 2px dashed rgba(139, 92, 246, 0.5); border-radius: var(--border-radius); padding: 3rem 2rem; text-align: center; cursor: pointer; transition: var(--transition); margin-bottom: 1.5rem; }
.upload-area:hover { border-color: var(--primary-color); background: rgba(139, 92, 246, 0.05); }
.upload-area i { font-size: 3rem; color: var(--primary-color); margin-bottom: 1rem; }
.upload-area p { color: var(--text-muted); margin-bottom: 1rem; }
.upload-btn { background: var(--primary-color); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: var(--border-radius); font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; }
.upload-btn:hover { background: var(--primary-dark); transform: translateY(-2px); }
.file-input { display: none; }
.preview-container { width: 100%; height: 300px; background: rgba(15, 15, 35, 0.5); border-radius: var(--border-radius); display: flex; align-items: center; justify-content: center; margin-bottom: 1.5rem; overflow: hidden; }
.preview-image, .preview-video { max-width: 100%; max-height: 100%; border-radius: var(--border-radius); display: none; }
.preview-placeholder { text-align: center; color: var(--text-muted); }
.preview-placeholder i { font-size: 4rem; margin-bottom: 1rem; color: var(--primary-color); }
.controls { display: flex; flex-direction: column; gap: 1rem; margin-top: 1.5rem; }
.control-group { display: flex; flex-direction: column; gap: 0.5rem; }
.control-label { font-weight: 600; color: var(--text-color); }
.slider-container { display: flex; align-items: center; gap: 1rem; }
.slider { flex: 1; -webkit-appearance: none; height: 8px; border-radius: 4px; background: rgba(139, 92, 246, 0.2); outline: none; }
.slider::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary-color); cursor: pointer; }
.slider-value { min-width: 40px; text-align: center; font-weight: 600; }
.select-control { background: rgba(15, 15, 35, 0.5); border: 1px solid rgba(139, 92, 246, 0.3); border-radius: var(--border-radius); padding: 0.75rem; color: var(--text-color); font-size: 1rem; outline: none; transition: var(--transition); }
.select-control:focus { border-color: var(--primary-color); }
.generate-btn { background: linear-gradient(90deg, var(--primary-color), var(--secondary-color)); color: white; border: none; padding: 1rem 2rem; border-radius: var(--border-radius); font-weight: 600; font-size: 1.1rem; cursor: pointer; transition: var(--transition); display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-top: 1rem; }
.generate-btn:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(139, 92, 246, 0.3); }
.generate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }
.processing { display: none; text-align: center; padding: 2rem; }
.processing-spinner { width: 50px; height: 50px; border: 5px solid rgba(139, 92, 246, 0.3); border-top: 5px solid var(--primary-color); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 1.5rem; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.result-section { display: none; margin-top: 2rem; background: var(--card-bg); border-radius: var(--border-radius); padding: 2rem; border: 1px solid rgba(139, 92, 246, 0.2); }
.result-title { font-size: 1.5rem; margin-bottom: 1.5rem; color: var(--success-color); display: flex; align-items: center; gap: 0.75rem; }
.download-btn { background: var(--success-color); color: white; border: none; padding: 0.75rem 1.5rem; border-radius: var(--border-radius); font-weight: 600; cursor: pointer; transition: var(--transition); display: inline-flex; align-items: center; gap: 0.5rem; margin-top: 1rem; }
.download-btn:hover { background: #0da271; transform: translateY(-2px); }
.warning { background: rgba(244, 63, 94, 0.1); border: 1px solid rgba(244, 63, 94, 0.3); border-radius: var(--border-radius); padding: 1rem; margin-top: 2rem; display: flex; align-items: flex-start; gap: 0.75rem; }
.warning i { color: var(--warning-color); font-size: 1.2rem; margin-top: 0.2rem; }
.warning p { color: var(--text-muted); font-size: 0.9rem; }
.footer { text-align: center; padding: 2rem; margin-top: 3rem; color: var(--text-muted); font-size: 0.9rem; border-top: 1px solid rgba(139, 92, 246, 0.1); } </style></head><body> <div class="header"> <div class="logo"> <i class="fas fa-robot"></i> <span>NSFW Image to Video AI</span> </div> <a href="https://huggingface.co/spaces/akhaliq/anycoder" class="anycoder-link">Built with anycoder</a> </div>
<div class="container"> <div class="hero"> <h1>Transform NSFW Images into Dynamic Videos</h1> <p>Upload your NSFW images and let our advanced AI technology generate captivating videos with custom animations and effects.</p> </div>
<div class="content"> <div class="upload-section"> <h2 class="section-title"> <i class="fas fa-upload"></i> Upload Image </h2> <div class="upload-area" id="uploadArea"> <i class="fas fa-cloud-upload-alt"></i> <p>Drag & drop your NSFW image here</p> <p>or</p> <button class="upload-btn"> <i class="fas fa-folder-open"></i> Browse Files </button> <input type="file" id="fileInput" class="file-input" accept="image/*"> </div>
<div class="controls"> <div class="control-group"> <label class="control-label">Animation Duration (seconds)</label> <div class="slider-container"> <input type="range" min="3" max="30" value="10" class="slider" id="durationSlider"> <span class="slider-value" id="durationValue">10s</span> </div> </div>
<div class="control-group"> <label class="control-label">Animation Style</label> <select class="select-control" id="animationStyle"> <option value="zoom">Zoom In/Out</option> <option value="pan">Panning Effect</option> <option value="ken-burns">Ken Burns Effect</option> <option value="fade">Fade Transitions</option> </select> </div>
<div class="control-group"> <label class="control-label">Video Quality</label> <select class="select-control" id="videoQuality"> <option value="480p">480p</option> <option value="720p">720p</option> <option value="1080p" selected>1080p</option> <option value="4k">4K</option> </select> </div>
<button class="generate-btn" id="generateBtn" disabled> <i class="fas fa-magic"></i> Generate Video </button> </div> </div>
<div class="preview-section"> <h2 class="section-title"> <i class="fas fa-eye"></i> Preview </h2> <div class="preview-container"> <div class="preview-placeholder" id="previewPlaceholder"> <i class="fas fa-image"></i> <p>Your image will appear here</p> </div> <img id="previewImage" class="preview-image" src="" alt="Preview"> <video id="previewVideo" class="preview-video" controls></video> </div>
<div class="processing" id="processing"> <div class="processing-spinner"></div> <h3>Generating your video...</h3> <p>This may take a few moments depending on the selected options.</p> </div>
<div class="result-section" id="resultSection"> <h3 class="result-title"> <i class="fas fa-check-circle"></i> Video Generated Successfully! </h3> <div class="preview-container"> <video id="resultVideo" class="preview-video" controls></video> </div> <button class="download-btn" id="downloadBtn"> <i class="fas fa-download"></i> Download Video </button> </div> </div> </div>
<div class="warning"> <i class="fas fa-exclamation-triangle"></i> <div> <p><strong>Important Notice:</strong> This application is intended for artistic and creative purposes only. Please ensure that you have the right to use any images you upload. The generated content should comply with applicable laws and platform policies.</p> </div> </div> </div>
<div class="footer"> <p>NSFW Image to Video AI Bot © 2023 | Built with anycoder</p> </div>
<script> document.addEventListener('DOMContentLoaded', function() { // Elements const uploadArea = document.getElementById('uploadArea'); const fileInput = document.getElementById('fileInput'); const previewImage = document.getElementById('previewImage'); const previewVideo = document.getElementById('previewVideo'); const previewPlaceholder = document.getElementById('previewPlaceholder'); const generateBtn = document.getElementById('generateBtn'); const processing = document.getElementById('processing'); const resultSection = document.getElementById('resultSection'); const resultVideo = document.getElementById('resultVideo'); const downloadBtn = document.getElementById('downloadBtn'); const durationSlider = document.getElementById('durationSlider'); const durationValue = document.getElementById('durationValue'); const animationStyle = document.getElementById('animationStyle'); const videoQuality = document.getElementById('videoQuality');
// Event listeners uploadArea.addEventListener('click', () => fileInput.click()); uploadArea.addEventListener('dragover', (e) => { e.preventDefault(); uploadArea.style.borderColor = 'var(--primary-color)'; uploadArea.style.background = 'rgba(139, 92, 246, 0.1)'; }); uploadArea.addEventListener('dragleave', () => { uploadArea.style.borderColor = 'rgba(139, 92, 246, 0.5)'; uploadArea.style.background = 'transparent'; }); uploadArea.addEventListener('drop', (e) => { e.preventDefault(); uploadArea.style.borderColor = 'rgba(139, 92, 246, 0.5)'; uploadArea.style.background = 'transparent'; if (e.dataTransfer.files.length) { handleFile(e.dataTransfer.files[0]); } });
fileInput.addEventListener('change', (e) => { if (e.target.files.length) { handleFile(e.target.files[0]); } });
durationSlider.addEventListener('input', () => { durationValue.textContent = `${durationSlider.value}s`; });
generateBtn.addEventListener('click', generateVideo); downloadBtn.addEventListener('click', downloadVideo);
// Functions function handleFile(file) { if (!file.type.match('image.*')) { alert('Please upload an image file.'); return; }
const reader = new FileReader(); reader.onload = function(e) { previewPlaceholder.style.display = 'none'; previewImage.style.display = 'block'; previewImage.src = e.target.result; generateBtn.disabled = false; }; reader.readAsDataURL(file); }
function generateVideo() { // Show processing state processing.style.display = 'block'; generateBtn.disabled = true; // Simulate processing time setTimeout(() => { processing.style.display = 'none'; resultSection.style.display = 'block'; // For demo purposes, we'll just show a placeholder // In a real app, this would be the actual generated video previewVideo.style.display = 'none'; resultVideo.style.display = 'block'; resultVideo.src = previewImage.src; // In reality, this would be the generated video // Reset generate button generateBtn.disabled = false; }, 3000); }
function downloadVideo() { // In a real application, this would download the actual generated video // For this demo, we'll just show an alert alert('In a real application, this would download your generated video. This is a demo interface.'); } }); </script></body></html>index.html+620-19