599 lines
37 KiB
HTML
599 lines
37 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<meta name="theme-color" content="#000000">
|
|
<meta name="color-scheme" content="dark">
|
|
<meta name="description" content="Vision · Liquid Vision & Prompt Studio powered by Qwen2.5-VL for reverse-engineering image prompts, OCR transcription, and dataset generation.">
|
|
<title>Vision · Liquid Vision & Prompt Studio</title>
|
|
|
|
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
<link href="https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,300;0,14..32,400;0,14..32,500;0,14..32,600;0,14..32,700;0,14..32,800;1,14..32,400&family=JetBrains+Mono:wght@400;500;600;700&family=Sora:wght@400;500;600;700;800&display=swap" rel="stylesheet">
|
|
|
|
<link rel="icon" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 64'%3E%3Cdefs%3E%3CradialGradient id='g' cx='.35' cy='.3' r='.85'%3E%3Cstop offset='0' stop-color='%2364B5F6'/%3E%3Cstop offset='0.5' stop-color='%237C4DFF'/%3E%3Cstop offset='1' stop-color='%2300E5FF'/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect width='64' height='64' rx='16' fill='%2306060c'/%3E%3Cpath fill='url(%23g)' d='M32 10l5 12 13 2-9 9 2 13-11-6-11 6 2-13-9-9 13-2z'/%3E%3C/svg%3E">
|
|
|
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css">
|
|
<link rel="stylesheet" href="styles.css">
|
|
</head>
|
|
<body>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════
|
|
LIQUID GLASS · SVG FILTER DEFS
|
|
════════════════════════════════════════════════════════════════ -->
|
|
<svg width="0" height="0" style="position:absolute;pointer-events:none;" aria-hidden="true">
|
|
<defs>
|
|
<filter id="liquid-glass-panel" x="-10%" y="-10%" width="120%" height="120%" color-interpolation-filters="sRGB">
|
|
<feImage href="assets/displacement-map-w2qrsb.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="displacement_map"></feImage>
|
|
<feDisplacementMap in="SourceGraphic" in2="displacement_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="18"></feDisplacementMap>
|
|
<feColorMatrix in="displaced" type="saturate" result="displaced_saturated" values="3"></feColorMatrix>
|
|
<feImage href="assets/specular-map-w2qrsb.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="specular_layer"></feImage>
|
|
<feComposite in="displaced_saturated" in2="specular_layer" operator="in" result="specular_saturated"></feComposite>
|
|
<feBlend in="specular_saturated" in2="displaced" mode="screen"></feBlend>
|
|
</filter>
|
|
|
|
<filter id="liquid-glass-bar" x="-5%" y="-5%" width="110%" height="110%" color-interpolation-filters="sRGB">
|
|
<feImage href="assets/displacement-map-76hifn.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="displacement_map"></feImage>
|
|
<feDisplacementMap in="SourceGraphic" in2="displacement_map" xChannelSelector="R" yChannelSelector="G" result="displaced" scale="10"></feDisplacementMap>
|
|
<feImage href="assets/specular-map-76hifn.png" x="0" y="0" width="100%" height="100%" preserveAspectRatio="none" result="specular_layer"></feImage>
|
|
<feBlend in="specular_layer" in2="displaced" mode="screen"></feBlend>
|
|
</filter>
|
|
</defs>
|
|
</svg>
|
|
|
|
<!-- Ambient background glows -->
|
|
<div class="ambient-glow glow-top-left"></div>
|
|
<div class="ambient-glow glow-bottom-right"></div>
|
|
|
|
<div class="app-root">
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════
|
|
TOP NAVIGATION BAR
|
|
════════════════════════════════════════════════════════════════ -->
|
|
<header class="app-header glass-bar">
|
|
<div class="header-left">
|
|
<div class="brand-capsule">
|
|
<div class="brand-orb">
|
|
<i class="fa-solid fa-wand-magic-sparkles"></i>
|
|
</div>
|
|
<div class="brand-meta">
|
|
<div class="brand-title">Vision AI</div>
|
|
<div class="brand-sub">Liquid Prompt & OCR Studio</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Nav Tabs -->
|
|
<nav class="nav-tabs" id="navTabs">
|
|
<button class="nav-tab active" data-tab="studio">
|
|
<i class="fa-solid fa-cube"></i>
|
|
<span>Studio</span>
|
|
</button>
|
|
<button class="nav-tab" data-tab="batch">
|
|
<i class="fa-solid fa-layer-group"></i>
|
|
<span>Batch Dataset</span>
|
|
</button>
|
|
<button class="nav-tab" data-tab="presets">
|
|
<i class="fa-solid fa-sliders"></i>
|
|
<span>Presets</span>
|
|
</button>
|
|
<button class="nav-tab" data-tab="history">
|
|
<i class="fa-solid fa-clock-rotate-left"></i>
|
|
<span>History</span>
|
|
<span class="tab-badge" id="historyCountBadge">0</span>
|
|
</button>
|
|
</nav>
|
|
</div>
|
|
|
|
<div class="header-right">
|
|
<!-- Model Status Capsule -->
|
|
<div class="model-status-capsule glass-pill" id="modelStatusCapsule" title="Click to view model & hardware status">
|
|
<span class="status-dot online" id="statusDot"></span>
|
|
<span class="model-name" id="modelNameDisplay">Qwen2.5-VL-3B · 4-bit</span>
|
|
</div>
|
|
|
|
<!-- VRAM Meter -->
|
|
<div class="vram-meter glass-pill" id="vramMeter" title="Live GPU VRAM telemetry">
|
|
<i class="fa-solid fa-microchip"></i>
|
|
<div class="vram-info">
|
|
<div class="vram-labels">
|
|
<span>VRAM</span>
|
|
<span class="vram-val" id="vramText">-- / -- GB</span>
|
|
</div>
|
|
<div class="vram-bar-track">
|
|
<div class="vram-bar-fill" id="vramFill" style="width: 0%;"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Hardware & Model Settings Modal Button -->
|
|
<button class="icon-btn glass-btn" id="openSettingsBtn" title="Hardware & Model Config">
|
|
<i class="fa-solid fa-gear"></i>
|
|
</button>
|
|
</div>
|
|
</header>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════
|
|
MAIN CONTENT AREA
|
|
════════════════════════════════════════════════════════════════ -->
|
|
<main class="app-main">
|
|
|
|
<!-- ─────────────────────────────────────────────────────────────
|
|
TAB 1: SINGLE IMAGE STUDIO
|
|
───────────────────────────────────────────────────────────── -->
|
|
<section class="tab-pane active" id="pane-studio">
|
|
<div class="studio-layout">
|
|
|
|
<!-- Left Column: Input and Configuration -->
|
|
<div class="studio-col input-col">
|
|
|
|
<!-- Image Dropzone Glass Card -->
|
|
<div class="glass-card dropzone-card" id="dropzoneCard">
|
|
<input type="file" id="imageFileInput" accept="image/*" style="display: none;">
|
|
|
|
<div class="dropzone-empty" id="dropzoneEmpty">
|
|
<div class="dropzone-icon">
|
|
<i class="fa-solid fa-cloud-arrow-up"></i>
|
|
</div>
|
|
<div class="dropzone-text">
|
|
<div class="primary-text">Drag & drop your image here</div>
|
|
<div class="secondary-text">or <button type="button" class="link-btn" id="browseBtn">browse files</button> · or press <kbd>Ctrl+V</kbd> to paste</div>
|
|
</div>
|
|
<div class="dropzone-formats">JPG · PNG · WEBP · BMP · TIFF · AVIF</div>
|
|
</div>
|
|
|
|
<div class="dropzone-filled" id="dropzoneFilled" style="display: none;">
|
|
<div class="preview-wrap">
|
|
<img id="previewImg" src="" alt="Preview">
|
|
<button class="remove-img-btn" id="removeImgBtn" title="Remove image">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
<div class="preview-meta" id="previewMeta">
|
|
<span class="meta-pill" id="imgDimensionsPill"><i class="fa-regular fa-image"></i> -- x --</span>
|
|
<span class="meta-pill" id="imgSizePill"><i class="fa-solid fa-weight-hanging"></i> -- KB</span>
|
|
<span class="meta-pill" id="imgNamePill"><i class="fa-solid fa-tag"></i> filename.png</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Analysis Modes Glass Card -->
|
|
<div class="glass-card mode-card">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
<i class="fa-solid fa-wand-magic"></i>
|
|
<span>Analysis Mode</span>
|
|
</div>
|
|
<span class="card-badge" id="selectedModeBadge">Flux / MJ Prompt</span>
|
|
</div>
|
|
|
|
<div class="mode-grid" id="modeGrid">
|
|
<button class="mode-btn active" data-mode="prompt">
|
|
<i class="fa-solid fa-compass-drafting"></i>
|
|
<span class="mode-title">Prompt (Flux/MJ)</span>
|
|
<span class="mode-desc">T2I prompt synthesis</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="flux">
|
|
<i class="fa-solid fa-camera"></i>
|
|
<span class="mode-title">Flux Detailed</span>
|
|
<span class="mode-desc">Lens, framing & style</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="detailed">
|
|
<i class="fa-solid fa-eye"></i>
|
|
<span class="mode-title">Dense Vision</span>
|
|
<span class="mode-desc">Thorough visual analysis</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="ocr">
|
|
<i class="fa-solid fa-font"></i>
|
|
<span class="mode-title">OCR Text</span>
|
|
<span class="mode-desc">Extract all visible text</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="tags">
|
|
<i class="fa-solid fa-tags"></i>
|
|
<span class="mode-title">Keywords</span>
|
|
<span class="mode-desc">Comma-separated tags</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="short">
|
|
<i class="fa-solid fa-quote-left"></i>
|
|
<span class="mode-title">Caption</span>
|
|
<span class="mode-desc">One-sentence summary</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="story">
|
|
<i class="fa-solid fa-book-open"></i>
|
|
<span class="mode-title">Story Narrative</span>
|
|
<span class="mode-desc">Creative atmosphere</span>
|
|
</button>
|
|
<button class="mode-btn" data-mode="custom">
|
|
<i class="fa-solid fa-pen-nib"></i>
|
|
<span class="mode-title">Custom Instruction</span>
|
|
<span class="mode-desc">Ask anything about image</span>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Prompt Instruction Box -->
|
|
<div class="prompt-box-wrap">
|
|
<label for="promptInput" class="field-label">
|
|
<span>Model Instruction / Prompt</span>
|
|
<button class="reset-prompt-btn" id="resetPromptBtn" title="Reset to mode default">
|
|
<i class="fa-solid fa-rotate-left"></i> Reset
|
|
</button>
|
|
</label>
|
|
<textarea id="promptInput" class="glass-textarea" rows="3" placeholder="Enter instructions or query for the Vision model..."></textarea>
|
|
</div>
|
|
|
|
<!-- Advanced Tuning Accordion -->
|
|
<div class="accordion glass-accordion">
|
|
<button class="accordion-header" id="accordionToggle">
|
|
<span><i class="fa-solid fa-sliders"></i> Generation Parameters</span>
|
|
<i class="fa-solid fa-chevron-down accordion-arrow"></i>
|
|
</button>
|
|
<div class="accordion-body" id="accordionBody">
|
|
<div class="param-row">
|
|
<div class="param-meta">
|
|
<span class="param-name">Max Tokens</span>
|
|
<span class="param-val" id="maxTokensVal">512</span>
|
|
</div>
|
|
<input type="range" id="maxTokensRange" min="32" max="2048" step="32" value="512" class="glass-slider">
|
|
</div>
|
|
<div class="param-row">
|
|
<div class="param-meta">
|
|
<span class="param-name">Temperature</span>
|
|
<span class="param-val" id="tempVal">0.20</span>
|
|
</div>
|
|
<input type="range" id="tempRange" min="0.0" max="1.0" step="0.05" value="0.2" class="glass-slider">
|
|
</div>
|
|
<div class="param-row">
|
|
<div class="param-meta">
|
|
<span class="param-name">Top-P Sampling</span>
|
|
<span class="param-val" id="topPVal">0.90</span>
|
|
</div>
|
|
<input type="range" id="topPRange" min="0.1" max="1.0" step="0.05" value="0.9" class="glass-slider">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Generate Button -->
|
|
<button class="primary-btn glow-btn" id="generateBtn">
|
|
<span class="btn-spinner" id="btnSpinner" style="display: none;">
|
|
<i class="fa-solid fa-circle-notch fa-spin"></i>
|
|
</span>
|
|
<span class="btn-content">
|
|
<i class="fa-solid fa-sparkles"></i>
|
|
<span>Generate Prompt / Text</span>
|
|
<kbd class="shortcut-kbd">Ctrl+Enter</kbd>
|
|
</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Right Column: Results and Output -->
|
|
<div class="studio-col output-col">
|
|
<div class="glass-card output-card">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
<i class="fa-solid fa-sparkles"></i>
|
|
<span>Generated Output</span>
|
|
</div>
|
|
<div class="output-actions">
|
|
<button class="action-btn" id="copyResultBtn" title="Copy text to clipboard">
|
|
<i class="fa-regular fa-copy"></i>
|
|
<span>Copy</span>
|
|
</button>
|
|
<button class="action-btn" id="downloadTxtBtn" title="Download as .txt sidecar">
|
|
<i class="fa-solid fa-file-arrow-down"></i>
|
|
<span>.txt</span>
|
|
</button>
|
|
<button class="action-btn" id="downloadJsonBtn" title="Download output as JSON">
|
|
<i class="fa-solid fa-code"></i>
|
|
<span>JSON</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Result Display State -->
|
|
<div class="output-content">
|
|
<div class="output-placeholder" id="outputPlaceholder">
|
|
<div class="placeholder-icon">
|
|
<i class="fa-solid fa-wand-sparkles"></i>
|
|
</div>
|
|
<div class="placeholder-title">Ready for inference</div>
|
|
<div class="placeholder-desc">Upload an image and choose a mode to reverse-engineer prompts or transcribe text.</div>
|
|
</div>
|
|
|
|
<div class="output-result" id="outputResult" style="display: none;">
|
|
<div class="result-text-container">
|
|
<pre class="result-text" id="resultText"></pre>
|
|
</div>
|
|
|
|
<div class="result-footer">
|
|
<div class="result-chips">
|
|
<span class="chip" id="chipTime"><i class="fa-solid fa-stopwatch"></i> --s</span>
|
|
<span class="chip" id="chipTokens"><i class="fa-solid fa-bars-staggered"></i> -- tokens</span>
|
|
<span class="chip" id="chipMode"><i class="fa-solid fa-layer-group"></i> prompt</span>
|
|
<span class="chip" id="chipDim"><i class="fa-solid fa-vector-square"></i> -- x --</span>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ─────────────────────────────────────────────────────────────
|
|
TAB 2: BATCH & DATASET GENERATOR
|
|
───────────────────────────────────────────────────────────── -->
|
|
<section class="tab-pane" id="pane-batch">
|
|
<div class="batch-layout">
|
|
|
|
<!-- Batch Controls Card -->
|
|
<div class="glass-card batch-controls-card">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
<i class="fa-solid fa-layer-group"></i>
|
|
<span>Batch & Dataset Configuration</span>
|
|
</div>
|
|
<div class="batch-source-toggle">
|
|
<button class="toggle-btn active" id="batchSourceUploadBtn">Upload Files</button>
|
|
<button class="toggle-btn" id="batchSourceFolderBtn">Server Folder Path</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Source A: Multi-file upload -->
|
|
<div class="batch-source-section" id="batchSourceUploadSection">
|
|
<input type="file" id="batchFilesInput" multiple accept="image/*" style="display: none;">
|
|
<div class="batch-dropzone" id="batchDropzone">
|
|
<i class="fa-solid fa-images"></i>
|
|
<div class="dropzone-text">
|
|
<div class="primary-text">Drag & drop multiple images or a whole dataset</div>
|
|
<div class="secondary-text">or <button type="button" class="link-btn" id="batchBrowseBtn">browse files</button></div>
|
|
</div>
|
|
<div class="batch-files-count" id="batchFilesCount">0 files selected</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Source B: Server folder path -->
|
|
<div class="batch-source-section" id="batchSourceFolderSection" style="display: none;">
|
|
<div class="folder-input-group">
|
|
<label for="batchFolderPathInput" class="field-label">Absolute Server Folder Path</label>
|
|
<div class="input-with-icon">
|
|
<i class="fa-solid fa-folder"></i>
|
|
<input type="text" id="batchFolderPathInput" class="glass-input" placeholder="/home/creserver/Desktop/my_images_dataset">
|
|
</div>
|
|
</div>
|
|
<div class="checkbox-row">
|
|
<label class="glass-checkbox">
|
|
<input type="checkbox" id="batchRecursiveCb">
|
|
<span class="checkmark"></span>
|
|
<span>Recursive scan subdirectories</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Batch Settings -->
|
|
<div class="batch-settings-grid">
|
|
<div class="setting-item">
|
|
<label class="field-label">Preset Mode</label>
|
|
<select id="batchModeSelect" class="glass-select">
|
|
<option value="prompt">Prompt (Flux / Midjourney)</option>
|
|
<option value="flux">Flux.1 Detailed</option>
|
|
<option value="detailed">Dense Visual Description</option>
|
|
<option value="ocr">OCR Text Transcription</option>
|
|
<option value="tags">Keywords & Tags</option>
|
|
<option value="short">Short Caption</option>
|
|
<option value="story">Creative Narrative</option>
|
|
<option value="custom">Custom Instruction</option>
|
|
</select>
|
|
</div>
|
|
|
|
<div class="setting-item custom-prompt-item" id="batchCustomPromptItem" style="display: none;">
|
|
<label class="field-label">Custom Instruction</label>
|
|
<input type="text" id="batchCustomPromptInput" class="glass-input" placeholder="e.g. List all clothing and colors">
|
|
</div>
|
|
</div>
|
|
|
|
<div class="checkbox-group">
|
|
<label class="glass-checkbox">
|
|
<input type="checkbox" id="batchSidecarCb" checked>
|
|
<span class="checkmark"></span>
|
|
<span>Save sidecar <kbd><image>.txt</kbd> files alongside images (ideal for LoRA datasets)</span>
|
|
</label>
|
|
<label class="glass-checkbox">
|
|
<input type="checkbox" id="batchSkipExistingCb" checked>
|
|
<span class="checkmark"></span>
|
|
<span>Skip already processed images (auto-resume support)</span>
|
|
</label>
|
|
</div>
|
|
|
|
<div class="batch-actions-row">
|
|
<button class="primary-btn glow-btn" id="startBatchBtn">
|
|
<i class="fa-solid fa-play"></i>
|
|
<span>Start Batch Processing</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Batch Progress & Live Results Card -->
|
|
<div class="glass-card batch-results-card">
|
|
<div class="card-header">
|
|
<div class="card-title">
|
|
<i class="fa-solid fa-list-check"></i>
|
|
<span>Batch Status & Progress</span>
|
|
</div>
|
|
<div class="batch-export-btns" id="batchExportBtns" style="display: none;">
|
|
<a id="exportZipBtn" class="action-btn" href="#" target="_blank">
|
|
<i class="fa-solid fa-file-zipper"></i>
|
|
<span>Download ZIP</span>
|
|
</a>
|
|
<a id="exportJsonBtn" class="action-btn" href="#" target="_blank">
|
|
<i class="fa-solid fa-code"></i>
|
|
<span>JSON</span>
|
|
</a>
|
|
<a id="exportCsvBtn" class="action-btn" href="#" target="_blank">
|
|
<i class="fa-solid fa-file-csv"></i>
|
|
<span>CSV</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Progress Bar Block -->
|
|
<div class="progress-block" id="progressBlock" style="display: none;">
|
|
<div class="progress-meta">
|
|
<span class="progress-status" id="progressStatusText">Processing...</span>
|
|
<span class="progress-numbers" id="progressNumbers">0 / 0 (0%)</span>
|
|
</div>
|
|
<div class="progress-bar-track">
|
|
<div class="progress-bar-fill" id="progressBarFill" style="width: 0%;"></div>
|
|
</div>
|
|
<div class="progress-current-file">
|
|
<span>Current: </span>
|
|
<strong id="progressCurrentFile">--</strong>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Results Table / List -->
|
|
<div class="batch-table-wrap">
|
|
<table class="glass-table" id="batchTable">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 50px;">#</th>
|
|
<th style="width: 200px;">Image</th>
|
|
<th style="width: 100px;">Status</th>
|
|
<th>Generated Output</th>
|
|
<th style="width: 90px;">Time</th>
|
|
<th style="width: 80px;">Action</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody id="batchTableBody">
|
|
<tr class="empty-row">
|
|
<td colspan="6">No batch job running yet. Select images or folder to begin.</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ─────────────────────────────────────────────────────────────
|
|
TAB 3: PRESETS LIBRARY
|
|
───────────────────────────────────────────────────────────── -->
|
|
<section class="tab-pane" id="pane-presets">
|
|
<div class="presets-container">
|
|
<div class="section-hero">
|
|
<h2>Vision Analysis Presets</h2>
|
|
<p>Pre-engineered instructions optimized for text-to-image prompts, camera aesthetics, OCR, and rich image captions.</p>
|
|
</div>
|
|
|
|
<div class="presets-grid" id="presetsCardsGrid">
|
|
<!-- Populated dynamically via app.js -->
|
|
</div>
|
|
</div>
|
|
</section>
|
|
|
|
<!-- ─────────────────────────────────────────────────────────────
|
|
TAB 4: HISTORY & GALLERY
|
|
───────────────────────────────────────────────────────────── -->
|
|
<section class="tab-pane" id="pane-history">
|
|
<div class="history-container">
|
|
<div class="section-hero">
|
|
<div class="hero-with-action">
|
|
<div>
|
|
<h2>Recent Generations</h2>
|
|
<p>Browse recent single-image inferences, inspect full results, and re-copy generated text.</p>
|
|
</div>
|
|
<button class="danger-btn" id="clearHistoryBtn">
|
|
<i class="fa-solid fa-trash-can"></i>
|
|
<span>Clear History</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="history-grid" id="historyGrid">
|
|
<div class="history-empty" id="historyEmpty">
|
|
<i class="fa-regular fa-clock"></i>
|
|
<div>No previous generations found.</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</section>
|
|
</main>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════
|
|
HARDWARE & MODEL SETTINGS MODAL
|
|
════════════════════════════════════════════════════════════════ -->
|
|
<div class="modal-backdrop" id="settingsModal" style="display: none;">
|
|
<div class="modal-card glass-modal">
|
|
<div class="modal-header">
|
|
<div class="modal-title">
|
|
<i class="fa-solid fa-microchip"></i>
|
|
<span>Hardware & Model Configuration</span>
|
|
</div>
|
|
<button class="modal-close" id="closeSettingsBtn">
|
|
<i class="fa-solid fa-xmark"></i>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="modal-body">
|
|
<!-- GPU Telemetry Section -->
|
|
<div class="settings-group">
|
|
<div class="group-title">GPU Telemetry</div>
|
|
<div class="telemetry-cards">
|
|
<div class="telemetry-card">
|
|
<div class="telemetry-label">Device</div>
|
|
<div class="telemetry-val" id="gpuDeviceName">--</div>
|
|
</div>
|
|
<div class="telemetry-card">
|
|
<div class="telemetry-label">VRAM Usage</div>
|
|
<div class="telemetry-val" id="gpuVramUsage">-- / -- GB</div>
|
|
</div>
|
|
<div class="telemetry-card">
|
|
<div class="telemetry-label">Utilization</div>
|
|
<div class="telemetry-val" id="gpuVramPercent">--%</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Model Configuration Section -->
|
|
<div class="settings-group">
|
|
<div class="group-title">Model Architecture</div>
|
|
<div class="field-item">
|
|
<label for="modelIdInput" class="field-label">Model Identifier</label>
|
|
<input type="text" id="modelIdInput" class="glass-input" value="Qwen/Qwen2.5-VL-3B-Instruct">
|
|
</div>
|
|
<div class="field-item">
|
|
<label for="quantSelect" class="field-label">Quantization Mode</label>
|
|
<select id="quantSelect" class="glass-select">
|
|
<option value="auto">Auto (4-bit NF4 on 8GB GPU, bf16 on 16GB+)</option>
|
|
<option value="4bit">4-bit NF4 (BitsAndBytes ~2.2 GB VRAM)</option>
|
|
<option value="8bit">8-bit (BitsAndBytes ~4.0 GB VRAM)</option>
|
|
<option value="bf16">bfloat16 (Full Precision ~7.0 GB VRAM)</option>
|
|
<option value="fp16">float16</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="modal-footer">
|
|
<button class="secondary-btn" id="unloadModelBtn">
|
|
<i class="fa-solid fa-broom"></i>
|
|
<span>Free VRAM (Unload)</span>
|
|
</button>
|
|
<button class="primary-btn" id="applyModelBtn">
|
|
<i class="fa-solid fa-arrows-rotate"></i>
|
|
<span>Apply & Reload Model</span>
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ════════════════════════════════════════════════════════════════
|
|
TOAST CONTAINER
|
|
════════════════════════════════════════════════════════════════ -->
|
|
<div class="toast-container" id="toastContainer"></div>
|
|
</div>
|
|
|
|
<script src="app.js"></script>
|
|
</body>
|
|
</html>
|