Add 3 files
Browse filesFiles changed (3)
- README.md+7-5
- index.html+722-19
- prompts.txtAdded+3
12345678910---title: Removemeemoji: 🏃colorFrom: greencolorTo: pinksdk: staticpinned: false---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference123456789101112---title: removemeemoji: 🐳colorFrom: bluecolorTo: purplesdk: staticpinned: falsetags:- deepsite---Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
12345678910111213141516171819<!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>123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722<!DOCTYPE html><html lang="de"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><title>FotoFreisteller Pro - Massen-Hintergrundentfernung</title><script src="https://cdn.tailwindcss.com"></script><script src="https://kit.fontawesome.com/a076d05399.js" crossorigin="anonymous"></script><style>@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');body {font-family: 'Poppins', sans-serif;background-color: #f8fafc;}.file-upload {position: relative;overflow: hidden;cursor: pointer;}.file-upload input {position: absolute;top: 0;right: 0;margin: 0;padding: 0;font-size: 20px;cursor: pointer;opacity: 0;filter: alpha(opacity=0);}.preview-item {transition: all 0.3s ease;}.spinner {animation: spin 1s linear infinite;}@keyframes spin {0% { transform: rotate(0deg); }100% { transform: rotate(360deg); }}.dropzone {border: 2px dashed #cbd5e1;transition: all 0.3s ease;}.dropzone.active {border-color: #4f46e5;background-color: rgba(79, 70, 229, 0.05);}.progress-bar {height: 6px;transition: width 0.3s ease;}#resultsGrid {display: grid;grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));gap: 1rem;}.thumbnail {position: relative;padding-bottom: 100%;overflow: hidden;}.thumbnail img {position: absolute;top: 0;left: 0;width: 100%;height: 100%;object-fit: contain;background-color: #fff;background-image: linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%),linear-gradient(45deg, #e5e7eb 25%, transparent 25%, transparent 75%, #e5e7eb 75%);background-size: 20px 20px;background-position: 0 0, 10px 10px;}.tabs button.active {border-bottom: 2px solid #4f46e5;color: #4f46e5;}/* Scrollbar für die Vorschau */#selectedFiles {scrollbar-width: thin;scrollbar-color: #cbd5e1 #f1f1f1;}#selectedFiles::-webkit-scrollbar {width: 8px;}#selectedFiles::-webkit-scrollbar-track {background: #f1f1f1;border-radius: 4px;}#selectedFiles::-webkit-scrollbar-thumb {background-color: #cbd5e1;border-radius: 4px;}.batch-note {background-color: #f0f9ff;border-left: 4px solid #60a5fa;}</style></head><body><div class="min-h-screen flex flex-col"><header class="bg-white shadow-sm"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-6"><div class="flex justify-between items-center"><h1 class="text-3xl font-bold text-indigo-600 flex items-center"><i class="fas fa-magic mr-2"></i> FotoFreisteller Pro</h1><div class="text-sm text-gray-500">Professionelle Massen-Hintergrundentfernung</div></div></div></header><main class="flex-grow"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"><div class="text-center mb-12"><h2 class="text-2xl font-semibold text-gray-800">Entfernen Sie Hintergründe von bis zu 50 Fotos</h2><p class="mt-2 text-lg text-gray-600">Stapelverarbeitung für schnelle Ergebnisse mit mehreren Bildern</p></div><div class="bg-white rounded-xl shadow-md overflow-hidden"><!-- Tabs --><div class="border-b border-gray-200"><nav class="flex -mb-px"><button id="uploadTab" class="tabs-button tab-active py-4 px-6 text-center border-b-2 font-medium text-sm border-indigo-500 text-indigo-600"><i class="fas fa-upload mr-2"></i>Bilder hochladen</button><button id="resultsTab" class="tabs-button py-4 px-6 text-center border-b-2 font-medium text-sm border-transparent text-gray-500 hover:text-gray-700 hover:border-gray-300"><i class="fas fa-images mr-2"></i>Ergebnisse</button></nav></div><!-- Upload Tab Content --><div id="uploadTabContent" class="p-6"><div class="mb-6"><divid="dropzone"class="dropzone rounded-xl bg-white flex flex-col items-center justify-center p-8"><div id="uploadContent" class="text-center"><div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-indigo-100 mb-4"><i class="fas fa-images text-indigo-600 text-2xl"></i></div><h3 class="text-lg font-medium text-gray-700">Ziehen Sie Ihre Fotos hierher</h3><p class="mt-1 text-sm text-gray-500">oder</p><div class="mt-4"><label class="file-upload"><span class="px-4 py-2 bg-indigo-600 rounded-md text-white font-medium hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">Dateien auswählen (Max 50)</span><input id="fileInput" type="file" accept="image/*" multiple class="hidden"></label></div><p class="mt-2 text-xs text-gray-500">Unterstützt JPG, PNG, WEBP (Max 10MB pro Datei, bis zu 50 Dateien)</p></div><div id="processingContent" class="hidden flex-col items-center w-full"><div class="w-full bg-gray-200 rounded-full h-2.5 mb-4"><div id="batchProgress" class="progress-bar bg-indigo-600 h-2.5 rounded-full" style="width: 0%"></div></div><div class="flex items-center text-gray-600"><div id="spinner" class="spinner w-5 h-5 border-2 border-indigo-500 border-t-transparent rounded-full mr-2"></div><span id="progressText">Verarbeite 1 von 50 Bildern...</span></div><div class="mt-4 batch-note p-3 rounded text-sm w-full text-left"><i class="fas fa-info-circle mr-2 text-blue-500"></i><span id="batchNote">Die Massenverarbeitung kann einige Minuten dauern. Bitte lassen Sie den Tab geöffnet.</span></div></div></div></div><!-- Selected Files Preview --><div id="selectedFilesContainer" class="hidden"><div class="flex justify-between items-center mb-4"><h3 class="text-lg font-medium text-gray-800">Ausgewählte Dateien (<span id="fileCount">0</span>/50)</h3><div class="text-sm text-gray-500"><span id="totalSize">0 MB</span> gesamt</div></div><div id="selectedFiles" class="space-y-3 max-h-96 overflow-y-auto p-2 border border-gray-200 rounded-md"></div><div class="mt-4 flex justify-between"><button id="clearAllBtn" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50"><i class="fas fa-trash mr-2"></i> Alle löschen</button><button id="processBtn" class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700"><i class="fas fa-play mr-2"></i> Stapelverarbeitung starten</button></div></div></div><!-- Results Tab Content --><div id="resultsTabContent" class="hidden p-6"><div id="noResultsMessage" class="text-center py-12"><div class="mx-auto flex items-center justify-center h-16 w-16 rounded-full bg-gray-100 mb-4"><i class="fas fa-images text-gray-400 text-2xl"></i></div><h3 class="text-lg font-medium text-gray-700">Noch keine Ergebnisse</h3><p class="mt-1 text-sm text-gray-500">Ihre bearbeiteten Bilder erscheinen hier</p></div><div id="resultsWrapper" class="hidden"><div class="flex justify-between items-center mb-4"><h3 class="text-lg font-medium text-gray-800">Verarbeitete Bilder (<span id="resultsCount">0</span>)</h3><div class="flex space-x-2"><button id="downloadAllBtn" class="px-4 py-2 border border-transparent rounded-md shadow-sm text-sm font-medium text-white bg-indigo-600 hover:bg-indigo-700"><i class="fas fa-download mr-2"></i> Alle herunterladen</button><button id="clearResultsBtn" class="px-4 py-2 border border-gray-300 rounded-md shadow-sm text-sm font-medium text-gray-700 bg-white hover:bg-gray-50"><i class="fas fa-trash mr-2"></i> Alle löschen</button></div></div><div id="resultsGrid" class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-4"></div></div></div></div><div class="mt-12 bg-white rounded-xl shadow-md p-6"><h3 class="text-xl font-semibold text-gray-800 mb-4">Anleitung zur Stapelverarbeitung</h3><div class="grid md:grid-cols-4 gap-6"><div class="flex flex-col items-center text-center"><div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600 mb-3"><span class="font-bold">1</span></div><h4 class="font-medium text-gray-800">Mehrere Dateien hochladen</h4><p class="mt-1 text-sm text-gray-600">Bis zu 50 Bilder gleichzeitig auswählen</p></div><div class="flex flex-col items-center text-center"><div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600 mb-3"><span class="font-bold">2</span></div><h4 class="font-medium text-gray-800">Auswahl überprüfen</h4><p class="mt-1 text-sm text-gray-600">Vorschau der ausgewählten Bilder</p></div><div class="flex flex-col items-center text-center"><div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600 mb-3"><span class="font-bold">3</span></div><h4 class="font-medium text-gray-800">Verarbeitung starten</h4><p class="mt-1 text-sm text-gray-600">Automatische Hintergrundentfernung</p></div><div class="flex flex-col items-center text-center"><div class="flex items-center justify-center h-12 w-12 rounded-full bg-indigo-100 text-indigo-600 mb-3"><span class="font-bold">4</span></div><h4 class="font-medium text-gray-800">Ergebnisse herunterladen</h4><p class="mt-1 text-sm text-gray-600">Alle Bilder oder einzelne Downloads</p></div></div></div></div></main><footer class="bg-white border-t border-gray-200 py-6"><div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 text-center text-sm text-gray-500">© 2023 FotoFreisteller Pro. Professionelle Massen-Hintergrundentfernung.</div></footer></div><script>document.addEventListener('DOMContentLoaded', function() {const API_KEY = 'sk_75af4394d5d5428d95aa1780083e9a97';const API_URL = 'https://developer.pixelcut.ai/remove-background';const MAX_FILES = 50; // Erhöht auf 50 Dateienconst MAX_FILE_SIZE = 10 * 1024 * 1024; // 10MBconst CONCURRENT_UPLOADS = 5; // Gleichzeitige Uploads// DOM elementsconst fileInput = document.getElementById('fileInput');const dropzone = document.getElementById('dropzone');const uploadContent = document.getElementById('uploadContent');const processingContent = document.getElementById('processingContent');const selectedFilesContainer = document.getElementById('selectedFilesContainer');const selectedFiles = document.getElementById('selectedFiles');const fileCount = document.getElementById('fileCount');const totalSize = document.getElementById('totalSize');const processBtn = document.getElementById('processBtn');const clearAllBtn = document.getElementById('clearAllBtn');const uploadTab = document.getElementById('uploadTab');const resultsTab = document.getElementById('resultsTab');const uploadTabContent = document.getElementById('uploadTabContent');const resultsTabContent = document.getElementById('resultsTabContent');const resultsWrapper = document.getElementById('resultsWrapper');const noResultsMessage = document.getElementById('noResultsMessage');const resultsGrid = document.getElementById('resultsGrid');const resultsCount = document.getElementById('resultsCount');const downloadAllBtn = document.getElementById('downloadAllBtn');const clearResultsBtn = document.getElementById('clearResultsBtn');const batchProgress = document.getElementById('batchProgress');const progressText = document.getElementById('progressText');const batchNote = document.getElementById('batchNote');// Statelet selectedFilesList = [];let processedResults = [];// Initialize tabsuploadTab.addEventListener('click', () => switchTab('upload'));resultsTab.addEventListener('click', () => switchTab('results'));function switchTab(tab) {if (tab === 'upload') {uploadTab.classList.add('border-indigo-500', 'text-indigo-600');uploadTab.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');resultsTab.classList.remove('border-indigo-500', 'text-indigo-600');resultsTab.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');uploadTabContent.classList.remove('hidden');resultsTabContent.classList.add('hidden');} else {resultsTab.classList.add('border-indigo-500', 'text-indigo-600');resultsTab.classList.remove('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');uploadTab.classList.remove('border-indigo-500', 'text-indigo-600');uploadTab.classList.add('border-transparent', 'text-gray-500', 'hover:text-gray-700', 'hover:border-gray-300');resultsTabContent.classList.remove('hidden');uploadTabContent.classList.add('hidden');// Update results viewupdateResultsView();}}// Drag and drop functionality['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {dropzone.addEventListener(eventName, preventDefaults, false);document.body.addEventListener(eventName, preventDefaults, false);});function preventDefaults(e) {e.preventDefault();e.stopPropagation();}['dragenter', 'dragover'].forEach(eventName => {dropzone.addEventListener(eventName, highlight, false);});['dragleave', 'drop'].forEach(eventName => {dropzone.addEventListener(eventName, unhighlight, false);});function highlight() {dropzone.classList.add('active');}function unhighlight() {dropzone.classList.remove('active');}dropzone.addEventListener('drop', handleDrop, false);function handleDrop(e) {const dt = e.dataTransfer;const files = dt.files;if (files.length > 0) {handleFiles(files);}}// File input change handlerfileInput.addEventListener('change', function() {if (this.files.length > 0) {handleFiles(this.files);}});function handleFiles(files) {// Reset file input to allow re-uploading the same filesfileInput.value = '';// Filter out non-image files and files that are too largeconst validFiles = Array.from(files).filter(file => {return file.type.match('image.*') && file.size <= MAX_FILE_SIZE;}).slice(0, MAX_FILES - selectedFilesList.length);// Check for invalid filesconst invalidFiles = Array.from(files).filter(file => {return !file.type.match('image.*') || file.size > MAX_FILE_SIZE;}).slice(0, files.length - validFiles.length);if (invalidFiles.length > 0) {alert(`${invalidFiles.length} Datei(en) wurden ignoriert. Nur JPG/PNG/WEBP-Dateien unter 10MB werden unterstützt.`);}if (validFiles.length === 0) return;// Add to selected filesselectedFilesList = [...selectedFilesList, ...validFiles];// Update UIupdateSelectedFilesView();// Calculate and display total sizeupdateTotalSize();// Show selected files containerif (selectedFilesList.length > 0) {selectedFilesContainer.classList.remove('hidden');if (selectedFilesList.length > 5) {batchNote.textContent = `Hinweis: Die Verarbeitung von ${selectedFilesList.length} Bildern kann mehrere Minuten dauern.`;}}// Update file countfileCount.textContent = selectedFilesList.length;// Disable process button if at max filesif (selectedFilesList.length >= MAX_FILES) {fileInput.disabled = true;const label = dropzone.querySelector('label span');if (label) {label.textContent = 'Maximale Anzahl erreicht (50)';label.classList.remove('bg-indigo-600', 'hover:bg-indigo-700');label.classList.add('bg-gray-400', 'cursor-not-allowed');}}}function updateTotalSize() {const totalBytes = selectedFilesList.reduce((sum, file) => sum + file.size, 0);totalSize.textContent = formatFileSize(totalBytes);}function updateSelectedFilesView() {selectedFiles.innerHTML = '';selectedFilesList.forEach((file, index) => {const fileElement = document.createElement('div');fileElement.className = 'flex items-center justify-between p-2 bg-gray-50 rounded';const previewContainer = document.createElement('div');previewContainer.className = 'flex items-center flex-grow';// Create thumbnail previewconst thumbnailContainer = document.createElement('div');thumbnailContainer.className = 'w-12 h-12 mr-3 flex-shrink-0';const thumbnail = document.createElement('div');thumbnail.className = 'w-full h-full bg-gray-200 rounded overflow-hidden';const img = document.createElement('img');img.className = 'w-full h-full object-cover';const fileReader = new FileReader();fileReader.onload = function(e) {img.src = e.target.result;};fileReader.readAsDataURL(file);thumbnail.appendChild(img);thumbnailContainer.appendChild(thumbnail);// File infoconst fileInfo = document.createElement('div');fileInfo.className = 'truncate';const fileName = document.createElement('div');fileName.className = 'text-sm font-medium text-gray-800 truncate';fileName.textContent = file.name.length > 20 ? file.name.substring(0, 20) + '...' : file.name;fileName.title = file.name;const fileSize = document.createElement('div');fileSize.className = 'text-xs text-gray-500';fileSize.textContent = formatFileSize(file.size);fileInfo.appendChild(fileName);fileInfo.appendChild(fileSize);// Remove buttonconst removeBtn = document.createElement('button');removeBtn.className = 'ml-2 text-gray-400 hover:text-red-500 focus:outline-none';removeBtn.innerHTML = '<i class="fas fa-times"></i>';removeBtn.onclick = () => removeFile(index);previewContainer.appendChild(thumbnailContainer);previewContainer.appendChild(fileInfo);fileElement.appendChild(previewContainer);fileElement.appendChild(removeBtn);selectedFiles.appendChild(fileElement);});}function formatFileSize(bytes) {if (bytes === 0) return '0 Bytes';const k = 1024;const sizes = ['Bytes', 'KB', 'MB'];const i = Math.floor(Math.log(bytes) / Math.log(k));return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + ' ' + sizes[i];}function removeFile(index) {selectedFilesList.splice(index, 1);updateSelectedFilesView();fileCount.textContent = selectedFilesList.length;updateTotalSize();if (selectedFilesList.length === 0) {selectedFilesContainer.classList.add('hidden');}// Re-enable file input if below max filesif (selectedFilesList.length < MAX_FILES) {fileInput.disabled = false;const label = dropzone.querySelector('label span');if (label) {label.textContent = 'Dateien auswählen (Max 50)';label.classList.add('bg-indigo-600', 'hover:bg-indigo-700');label.classList.remove('bg-gray-400', 'cursor-not-allowed');}}}clearAllBtn.addEventListener('click', clearAllFiles);function clearAllFiles() {selectedFilesList = [];selectedFiles.innerHTML = '';selectedFilesContainer.classList.add('hidden');fileCount.textContent = '0';totalSize.textContent = '0 MB';// Reset file inputfileInput.value = '';fileInput.disabled = false;const label = dropzone.querySelector('label span');if (label) {label.textContent = 'Dateien auswählen (Max 50)';label.classList.add('bg-indigo-600', 'hover:bg-indigo-700');label.classList.remove('bg-gray-400', 'cursor-not-allowed');}}processBtn.addEventListener('click', processFiles);async function processFiles() {if (selectedFilesList.length === 0) {alert('Bitte wählen Sie Dateien zur Verarbeitung aus');return;}uploadContent.classList.add('hidden');processingContent.classList.remove('hidden');// Process files in batches for better performanceconst totalFiles = selectedFilesList.length;const batchSize = CONCURRENT_UPLOADS;let completedFiles = 0;batchNote.textContent = `Verarbeite ${totalFiles} Bilder. Bitte verlassen Sie die Seite nicht.`;for (let i = 0; i < totalFiles; i += batchSize) {const batchEnd = Math.min(i + batchSize, totalFiles);const batch = selectedFilesList.slice(i, batchEnd);// Process batchawait Promise.all(batch.map(async (file, index) => {try {const result = await processSingleFile(file);processedResults.push({original: file,processed: result});completedFiles++;const progress = Math.round((completedFiles / totalFiles) * 100);batchProgress.style.width = `${progress}%`;progressText.textContent = `Verarbeite ${completedFiles} von ${totalFiles} Bildern...`;// Switch to results tab if processing the last fileif (completedFiles === totalFiles) {progressText.textContent = 'Verarbeitung abgeschlossen!';setTimeout(() => {processingContent.classList.add('hidden');uploadContent.classList.remove('hidden');clearAllFiles();switchTab('results');}, 1000);}} catch (error) {console.error(`Fehler bei der Verarbeitung von ${file.name}:`, error);progressText.textContent = `Fehler bei ${file.name}. Fahre fort...`;completedFiles++;}}));}}async function processSingleFile(file) {const formData = new FormData();formData.append('image_file', file);const response = await fetch(API_URL, {method: 'POST',headers: {'X-API-Key': API_KEY},body: formData});if (!response.ok) {throw new Error(`API Fehler: ${response.status}`);}return await response.blob();}function updateResultsView() {if (processedResults.length === 0) {noResultsMessage.classList.remove('hidden');resultsWrapper.classList.add('hidden');return;}noResultsMessage.classList.add('hidden');resultsWrapper.classList.remove('hidden');resultsCount.textContent = processedResults.length;resultsGrid.innerHTML = '';processedResults.forEach((result, index) => {const resultElement = document.createElement('div');resultElement.className = 'bg-white rounded-lg shadow-sm overflow-hidden border border-gray-200 hover:shadow-md transition-shadow';const thumbnail = document.createElement('div');thumbnail.className = 'thumbnail';const img = document.createElement('img');const url = URL.createObjectURL(result.processed);img.src = url;const actions = document.createElement('div');actions.className = 'p-2 bg-gray-50 flex justify-between';const downloadBtn = document.createElement('button');downloadBtn.className = 'text-indigo-600 hover:text-indigo-800 text-sm';downloadBtn.innerHTML = '<i class="fas fa-download mr-1"></i> Herunterladen';downloadBtn.onclick = () => {downloadImage(url, `freigestellt_${index}.png`);};const deleteBtn = document.createElement('button');deleteBtn.className = 'text-red-500 hover:text-red-700 text-sm';deleteBtn.innerHTML = '<i class="fas fa-trash mr-1"></i> Entfernen';deleteBtn.onclick = () => {processedResults.splice(index, 1);updateResultsView();};thumbnail.appendChild(img);actions.appendChild(downloadBtn);actions.appendChild(deleteBtn);resultElement.appendChild(thumbnail);resultElement.appendChild(actions);resultsGrid.appendChild(resultElement);});}function downloadImage(url, filename) {const a = document.createElement('a');a.href = url;a.download = filename;document.body.appendChild(a);a.click();document.body.removeChild(a);}downloadAllBtn.addEventListener('click', () => {if (processedResults.length === 0) return;// In einer echten Implementierung würden wir hier einen ZIP-Download ermöglichenalert('In einer echten Implementierung würden alle Bilder als ZIP-Datei heruntergeladen. Dies ist eine Demo-Einschränkung.');// Für die Demo laden wir die Bilder nacheinander herunterprocessedResults.forEach((result, index) => {setTimeout(() => {const url = URL.createObjectURL(result.processed);downloadImage(url, `freigestellt_${index}.png`);}, index * 300);});});clearResultsBtn.addEventListener('click', () => {processedResults = [];updateResultsView();});});</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=LuHof/removeme" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body></html>
123erstelle anhand folgender Seite und API-Schlüssels eine einfache Seite zum Freistellen meiner Fotos: https://developer.pixelcut.ai/remove-background API-Key: sk_75af4394d5d5428d95aa1780083e9a97Stapelverarbeitung soll möglich seinsetze das Limit auf max. 50 Fotos gleichzeitigREADME.md+7-5
index.html+722-19
prompts.txtAdded+3