Spaces:
Sleeping
Sleeping
File size: 16,055 Bytes
52a0fe9 a2aa7c3 52a0fe9 a2aa7c3 52a0fe9 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | <!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Alldocex β Intelligent Document Processing</title>
<meta name="description" content="Extract, analyse, and summarize content from PDF, DOCX, and image files using AI-powered document processing.">
<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:wght@300;400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="/static/styles.css">
</head>
<body>
<!-- subtle background -->
<div class="bg-orbs"></div>
<div class="app-container">
<!-- Header -->
<header class="header">
<div class="logo">
<div class="logo-icon">
<svg width="32" height="32" viewBox="0 0 32 32" fill="none">
<rect x="4" y="2" width="18" height="24" rx="3" stroke="currentColor" stroke-width="2.5"/>
<path d="M10 8h8M10 12h10M10 16h6" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
<circle cx="22" cy="22" r="8" fill="var(--accent-blue)" opacity="0.9"/>
<path d="M20 22l1.5 1.5L24 20" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
</div>
<div>
<h1>Alldocex</h1>
<p class="logo-subtitle">Intelligent Document Processing</p>
</div>
</div>
</header>
<!-- Main Content -->
<main class="main-content">
<!-- Upload Section -->
<section class="upload-section" id="uploadSection">
<div class="upload-zone" id="dropZone">
<div class="upload-icon">
<svg width="64" height="64" viewBox="0 0 64 64" fill="none">
<path d="M32 44V20M32 20L22 30M32 20L42 30" stroke="var(--accent-blue)" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"/>
<path d="M12 40v6a6 6 0 006 6h28a6 6 0 006-6v-6" stroke="var(--accent-blue)" stroke-width="3" stroke-linecap="round"/>
</svg>
</div>
<h2 class="upload-title">Drop your document here</h2>
<p class="upload-subtitle">or click to browse files</p>
<div class="upload-formats">
<span class="format-badge">PDF</span>
<span class="format-badge">DOCX</span>
<span class="format-badge">PNG</span>
<span class="format-badge">JPG</span>
<span class="format-badge">TIFF</span>
<span class="format-badge">BMP</span>
</div>
<p class="upload-limit">Maximum file size: 50MB</p>
<input type="file" id="fileInput" accept=".pdf,.docx,.png,.jpg,.jpeg,.tiff,.bmp,.webp" hidden>
</div>
<div class="url-section">
<div class="divider">
<span>OR</span>
</div>
<div class="url-input-container">
<div class="url-icon-subtle">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71"></path><path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71"></path></svg>
</div>
<input type="text" id="urlInput" placeholder="Paste a web URL here (e.g. https://wikipedia.org/...)">
<button class="btn-url" id="btnExtractUrl">
Summarize URL
</button>
</div>
</div>
</section>
<!-- Processing Indicator -->
<section class="processing-section hidden" id="processingSection">
<div class="processing-card">
<div class="processing-spinner">
<div class="spinner-ring"></div>
<div class="spinner-ring ring-inner"></div>
</div>
<h3 class="processing-title" id="processingTitle">Processing document...</h3>
<p class="processing-subtitle" id="processingSubtitle">Extracting text and running AI analysis</p>
<div class="processing-steps">
<div class="step" id="stepExtract">
<span class="step-icon">π</span>
<span>Text Extraction</span>
<span class="step-status">β³</span>
</div>
<div class="step" id="stepSummary">
<span class="step-icon">π</span>
<span>Summarization</span>
<span class="step-status">β³</span>
</div>
<div class="step" id="stepEntities">
<span class="step-icon">π·οΈ</span>
<span>Entity Recognition</span>
<span class="step-status">β³</span>
</div>
<div class="step" id="stepSentiment">
<span class="step-icon">π</span>
<span>Sentiment Analysis</span>
<span class="step-status">β³</span>
</div>
</div>
<!-- Cancel Button -->
<button class="btn-cancel" id="btnCancelProcessing" title="Cancel and return to upload">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><path d="M13.5 4.5l-9 9M4.5 4.5l9 9" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round"/></svg>
Cancel
</button>
</div>
</section>
<!-- Results Section -->
<section class="results-section hidden" id="resultsSection">
<!-- File Info Bar -->
<div class="file-info-bar" id="fileInfoBar">
<div class="file-info-left">
<span class="file-type-icon" id="fileTypeIcon">π</span>
<div>
<h3 class="file-name" id="fileName">document.pdf</h3>
<p class="file-meta" id="fileMeta">PDF β’ 2.3 MB β’ 15 pages</p>
</div>
</div>
<div class="file-info-right">
<span class="processing-time" id="processingTime">β± 1.2s</span>
<button class="btn-back" id="btnBackToUpload" title="Back to upload">
<svg width="18" height="18" viewBox="0 0 20 20" fill="none">
<path d="M15 10H5M10 15l-5-5 5-5" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
</svg>
Back
</button>
<button class="btn-new" id="btnNewUpload" title="Upload new document">
<svg width="18" height="18" viewBox="0 0 20 20" fill="none">
<path d="M10 4v12M4 10h12" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
</svg>
New Upload
</button>
</div>
</div>
<!-- Tabs -->
<div class="tabs">
<button class="tab active" data-tab="extracted" id="tabExtracted">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><path d="M3 3h12v12H3z" stroke="currentColor" stroke-width="1.5" rx="2"/><path d="M6 7h6M6 10h4" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Extracted Text
</button>
<button class="tab" data-tab="summary" id="tabSummary">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><path d="M3 5h12M3 9h8M3 13h10" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Summary
</button>
<button class="tab" data-tab="entities" id="tabEntities">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><circle cx="7" cy="7" r="4" stroke="currentColor" stroke-width="1.5"/><path d="M14 14l-3-3" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Entities
</button>
<button class="tab" data-tab="sentiment" id="tabSentiment">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><circle cx="9" cy="9" r="7" stroke="currentColor" stroke-width="1.5"/><path d="M6 11c.5 1 1.5 2 3 2s2.5-1 3-2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/><circle cx="6.5" cy="7.5" r="1" fill="currentColor"/><circle cx="11.5" cy="7.5" r="1" fill="currentColor"/></svg>
Sentiment
</button>
<button class="tab" data-tab="metadata" id="tabMetadata">
<svg width="18" height="18" viewBox="0 0 18 18" fill="none"><circle cx="9" cy="9" r="7" stroke="currentColor" stroke-width="1.5"/><path d="M9 6v3l2 2" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
Metadata
</button>
</div>
<!-- Tab Content -->
<div class="tab-content">
<!-- Extracted Text -->
<div class="tab-panel active" id="panelExtracted">
<div class="panel-header">
<h3>Extracted Text</h3>
<div class="panel-actions">
<button class="btn-copy" id="btnCopyText" title="Copy to clipboard">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M3 11V3a1 1 0 011-1h8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Copy
</button>
<button class="btn-download" id="btnDownloadText" title="Download as .txt">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><path d="M8 2v9M4 7l4 4 4-4M2 14h12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
Download
</button>
</div>
</div>
<div class="text-content" id="extractedText">
<p class="placeholder">No text extracted yet.</p>
</div>
</div>
<!-- Summary -->
<div class="tab-panel" id="panelSummary">
<div class="panel-header">
<h3>AI Summary</h3>
<button class="btn-copy" id="btnCopySummary" title="Copy to clipboard">
<svg width="16" height="16" viewBox="0 0 16 16" fill="none"><rect x="5" y="5" width="9" height="9" rx="1.5" stroke="currentColor" stroke-width="1.5"/><path d="M3 11V3a1 1 0 011-1h8" stroke="currentColor" stroke-width="1.5" stroke-linecap="round"/></svg>
Copy
</button>
</div>
<div class="summary-content" id="summaryContent">
<p class="placeholder">No summary available.</p>
</div>
<div class="key-highlights hidden" id="keyHighlightsContainer">
<h4>Key Highlights</h4>
<ul class="highlights-list" id="highlightsList"></ul>
</div>
<div class="summary-stats hidden" id="summaryStats">
<div class="stat-card">
<span class="stat-value" id="statOriginalLen">0</span>
<span class="stat-label">Original chars</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statSummaryLen">0</span>
<span class="stat-label">Summary chars</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statCompression">0%</span>
<span class="stat-label">Compression</span>
</div>
<div class="stat-card">
<span class="stat-value" id="statAlgorithm">β</span>
<span class="stat-label">Algorithm</span>
</div>
</div>
</div>
<!-- Entities -->
<div class="tab-panel" id="panelEntities">
<div class="panel-header">
<h3>Named Entities</h3>
<span class="entity-count" id="entityCount">0 entities found</span>
</div>
<div class="entity-categories" id="entityCategories">
<p class="placeholder">No entities detected.</p>
</div>
<div class="entity-list" id="entityList"></div>
</div>
<!-- Sentiment -->
<div class="tab-panel" id="panelSentiment">
<div class="panel-header">
<h3>Sentiment Analysis</h3>
</div>
<div class="sentiment-overview" id="sentimentOverview">
<p class="placeholder">No sentiment data available.</p>
</div>
</div>
<!-- Metadata -->
<div class="tab-panel" id="panelMetadata">
<div class="panel-header">
<h3>Document Metadata</h3>
</div>
<div class="metadata-content" id="metadataContent">
<p class="placeholder">No metadata available.</p>
</div>
</div>
</div>
</section>
</main>
<!-- Footer -->
<footer class="footer">
<p>Alldocex v1.0 β Powered by FastAPI, spaCy, VADER & Tesseract OCR</p>
</footer>
</div>
<!-- Toast Container -->
<div class="toast-container" id="toastContainer"></div>
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
<script src="/static/app.js"></script>
</body>
</html>
|