github-actions[bot] commited on
Commit Β·
aa3ab7e
1
Parent(s): 450750c
Auto-deploy from GitHub: 7d7ea68deaabe7026fbf5738ffdfbe29ae067235
Browse filesFiles changed (3)
- .gitattributes+1-1
- index.html+191-3
- tts_runner/engines/chatterbox.py+2-1
12345*.wav filter=lfs diff=lfs merge=lfs -text*.mp3 filter=lfs diff=lfs merge=lfs -text*.flac filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text12345*.mp3 filter=lfs diff=lfs merge=lfs -text*.flac filter=lfs diff=lfs merge=lfs -text*.pth filter=lfs diff=lfs merge=lfs -text*.bin filter=lfs diff=lfs merge=lfs -text*.wav filter=lfs diff=lfs merge=lfs -text
486 unmodified lines487488489490491492178 unmodified lines6716726736746756761 unmodified line67867968068168268368468568668768868969069135 unmodified lines727728729730731732486 unmodified linesopacity: 0;}}</style></head>178 unmodified linesconst response = await fetch(`${API_URL}/files`);const files = await response.json();const tbody = document.getElementById('filesTable');if (files.length === 0) {1 unmodified linereturn;}tbody.innerHTML = files.map(file => {return `<tr><td class="text-cell" title="${file.text}">${file.text}</td><td><span class="status status-${file.status}">${file.status.replace('_', ' ')}</span></td><td>${file.status === 'completed' && file.output_file ?`<a href="${API_URL}/download/${file.id}" class="btn btn-small btn-secondary" target="_blank">β¬οΈ Download</a>`: 'β'}</td><td>${new Date(file.created_at).toLocaleString()}</td>35 unmodified linesnotification.remove();}, 4000);}</script></body>486 unmodified lines487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604178 unmodified lines7837847857867877887897907911 unmodified line79379479579679779879980080180280380480580680780880981081181281381481535 unmodified lines851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920486 unmodified linesopacity: 0;}}/* Text Popup Modal */.text-modal-overlay {position: fixed;top: 0;left: 0;width: 100%;height: 100%;background: rgba(10, 14, 39, 0.95);display: flex;align-items: center;justify-content: center;z-index: 9999;animation: fadeIn 0.3s ease;padding: 2rem;}.text-modal {background: var(--surface);border: var(--border) solid var(--accent);box-shadow: 8px 8px 0 var(--accent);max-width: 800px;width: 100%;max-height: 80vh;display: flex;flex-direction: column;animation: slideUp 0.3s ease;}.text-modal-header {display: flex;justify-content: space-between;align-items: center;padding: 1rem 1.5rem;background: linear-gradient(135deg, var(--primary), var(--accent));border-bottom: 3px solid var(--bg);}.text-modal-header h3 {color: var(--bg);font-weight: 900;text-transform: uppercase;letter-spacing: 1px;}.text-modal-close {background: var(--bg);border: 2px solid var(--bg);color: var(--primary);width: 36px;height: 36px;font-size: 1.2rem;cursor: pointer;display: flex;align-items: center;justify-content: center;transition: all 0.2s ease;}.text-modal-close:hover {background: var(--error);color: var(--text);}.text-modal-content {padding: 1.5rem;overflow-y: auto;flex: 1;}.text-modal-content pre {white-space: pre-wrap;word-wrap: break-word;font-family: inherit;font-size: 1rem;line-height: 1.6;color: var(--text);margin: 0;}.text-modal-footer {padding: 1rem 1.5rem;border-top: 2px solid rgba(0, 212, 255, 0.2);display: flex;gap: 1rem;justify-content: flex-end;}.btn-view-text {background: var(--accent);padding: 0.4rem 0.8rem;font-size: 0.8rem;box-shadow: 2px 2px 0 var(--bg);}.btn-view-text:hover {transform: translate(-1px, -1px);box-shadow: 3px 3px 0 var(--bg);}.text-cell-wrapper {display: flex;align-items: center;gap: 0.5rem;}.text-cell-wrapper .text-preview {max-width: 200px;overflow: hidden;text-overflow: ellipsis;white-space: nowrap;}</style></head>178 unmodified linesconst response = await fetch(`${API_URL}/files`);const files = await response.json();// Store files data for popup accessfilesData = files;const tbody = document.getElementById('filesTable');if (files.length === 0) {1 unmodified linereturn;}tbody.innerHTML = files.map((file, index) => {// Escape text for HTML attribute and displayconst escapedText = escapeHtml(file.text);const truncatedText = file.text.length > 50 ? file.text.substring(0, 50) + '...' : file.text;return `<tr><td><div class="text-cell-wrapper"><span class="text-preview" title="${escapedText}">${escapeHtml(truncatedText)}</span><button class="btn btn-small btn-view-text" onclick="showTextPopup(${index})">ποΈ View</button></div></td><td><span class="status status-${file.status}">${file.status.replace('_', ' ')}</span></td><td>${file.status === 'completed' && file.output_file ?`<a href="${API_URL}/download/${file.id}" class="btn btn-small btn-secondary" target="_blank">β¬οΈ</a>`: 'β'}</td><td>${new Date(file.created_at).toLocaleString()}</td>35 unmodified linesnotification.remove();}, 4000);}// Store files data for popup accesslet filesData = [];// Escape HTML to prevent XSSfunction escapeHtml(text) {const div = document.createElement('div');div.textContent = text;return div.innerHTML;}// Show text popupfunction showTextPopup(index) {const file = filesData[index];if (!file) return;// Create modal overlayconst overlay = document.createElement('div');overlay.className = 'text-modal-overlay';overlay.onclick = (e) => {if (e.target === overlay) overlay.remove();};// Create modal contentoverlay.innerHTML = `<div class="text-modal"><div class="text-modal-header"><h3>π Full Text</h3><button class="text-modal-close" onclick="this.closest('.text-modal-overlay').remove()">β</button></div><div class="text-modal-content"><pre>${escapeHtml(file.text)}</pre></div><div class="text-modal-footer"><button class="btn btn-small btn-secondary" onclick="copyTextToClipboard(${index})">π Copy Text</button><button class="btn btn-small" onclick="this.closest('.text-modal-overlay').remove()">Close</button></div></div>`;document.body.appendChild(overlay);// Close on Escape keyconst handleEscape = (e) => {if (e.key === 'Escape') {overlay.remove();document.removeEventListener('keydown', handleEscape);}};document.addEventListener('keydown', handleEscape);}// Copy text to clipboardfunction copyTextToClipboard(index) {const file = filesData[index];if (!file) return;navigator.clipboard.writeText(file.text).then(() => {showNotification('Text copied to clipboard! π');}).catch((err) => {console.error('Failed to copy:', err);showNotification('Failed to copy text', 'error');});}</script></body>
95 unmodified lines9697989910010110295 unmodified linestemp_chunk = wordif temp_chunk:current = temp_chunk.strip()continue# Try adding sentence to current chunk95 unmodified lines9697989910010110210395 unmodified linestemp_chunk = wordif temp_chunk:chunks.append(temp_chunk.strip())current = ""continue# Try adding sentence to current chunk
.gitattributes+1-1
index.html+191-3
tts_runner/engines/chatterbox.py+2-1