<!doctype html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width" /> <title>My static Space</title> <style> #col-container { max-width: 100% !important; } div#component-2 { display: none; } button#component-16 { margin-bottom: 20px; border-radius: 10px; background: #e253dd; color: white; box-shadow: none; border: none !important; } </style> </head> <body> <script type="module" src="https://gradio.s3-us-west-2.amazonaws.com/4.19.0/gradio.js" ></script> <gradio-app id='ga33' src="https://fffiloni-pasd.hf.space"></gradio-app> <script> const targetNode41354 = document.body; // или другой родительский элемент const config41354 = { childList: true, subtree: true }; const callback41354 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp41354 = document.getElementById('ga33'); const targetDiv41354 = grApp41354.querySelector('#component-5'); const imgSrc = "http://localhost:7860/file=/tmp/gradio/85f0a75404f6d0ad5e6757284382fd4e388e091f/frog.png"; const newSrc = "https://myneuralnetworks.ru/static/img/fon19.webp"; targetDiv41354.querySelectorAll('img').forEach(img => { if (img.src === imgSrc) { img.src = newSrc; } }); observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer41354 = new MutationObserver(callback41354); observer41354.observe(targetNode41354, config41354); </script> <script> const targetNode4135 = document.body; // или другой родительский элемент const config4135 = { childList: true, subtree: true }; const callback4135 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp41325 = document.getElementById('ga33'); const targetDiv4135 = grApp41325.querySelector('#component-20'); const targetSpan4135 = targetDiv4135.querySelector('label[data-testid="block-label"]'); targetSpan4135.textContent = "Скачать результат:"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer4135 = new MutationObserver(callback4135); observer4135.observe(targetNode4135, config4135); </script> <script> const targetNode3 = document.body; // или другой родительский элемент const config3 = { childList: true, subtree: true }; const callback3 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp3 = document.getElementById('ga33'); const targetDiv3 = grApp3.querySelector('#component-7'); const targetSpan3 = Array.from(targetDiv3.querySelectorAll('span')).find(span => span.textContent.includes('Advanced settings')); targetSpan3.textContent = "Расширенные настройки"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer3 = new MutationObserver(callback3); observer3.observe(targetNode3, config3); </script> <script> const targetNode141 = document.body; // или другой родительский элемент const config141 = { childList: true, subtree: true }; const callback141 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp141 = document.getElementById('ga33'); const targetDiv141 = grApp141.querySelector('#component-6'); const targetSpan141 = targetDiv141.querySelector('span[data-testid="block-info"]'); targetSpan141.textContent = "Краткое описание фото:"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer141 = new MutationObserver(callback141); observer141.observe(targetNode141, config141); </script> <script> const targetNode54135 = document.body; // или другой родительский элемент const config54135 = { childList: true, subtree: true }; const callback54135 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp54132 = document.getElementById('ga33'); const targetDiv54135 = grApp54132.querySelector('#component-19'); const targetSpan54135 = targetDiv54135.querySelector('label[data-testid="block-label"]'); targetSpan54135.textContent = "Результат:"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer54135 = new MutationObserver(callback54135); observer54135.observe(targetNode54135, config54135); </script> <script> const targetNode5 = document.body; // или другой родительский элемент const config5 = { childList: true, subtree: true }; const callback5 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp2 = document.getElementById('ga33'); const targetDiv5 = grApp2.querySelector('#component-5'); const targetSpan5 = targetDiv5.querySelector('label[data-testid="block-label"]'); targetSpan5.textContent = "Исходное фото:"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer5 = new MutationObserver(callback5); observer5.observe(targetNode5, config5); </script> <script> const targetNode8 = document.body; // или другой родительский элемент const config8 = { childList: true, subtree: true }; const callback8 = function(mutationsList, observer) { for(let mutation of mutationsList) { if (mutation.type === 'childList') { const grApp8 = document.getElementById('ga33'); const targetDiv8 = grApp8.querySelector('#component-16'); targetDiv8.textContent = "Улучшить фото"; observer.disconnect(); // Останавливаем наблюдение после изменения } } }; const observer8 = new MutationObserver(callback8); observer8.observe(targetNode8, config8); </script> </body> </html>