
            const originalText = button.querySelector('span').textContent;
            const icon = button.querySelector('i');

            // Show loading state
            button.disabled = true;
            button.querySelector('span').textContent = 'Updating...';
            icon.classList.add('fa-spin');

            // Make the API call
            fetch('/models/reload', {
                method: 'POST',
                headers: {
                    'Content-Type': 'application/json',
             