Spaces:
Running
Running
o pdf não está funcionando a parte de analisar o documento , eu tento anexar e nada acontece
Browse files- index.html +186 -75
index.html
CHANGED
|
@@ -3,8 +3,8 @@
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
-
<title>SEI DocuMiner -
|
| 7 |
-
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
@@ -30,8 +30,8 @@
|
|
| 30 |
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
|
| 31 |
<div class="flex items-center space-x-2">
|
| 32 |
<i data-feather="archive" class="text-blue-600 w-8 h-8"></i>
|
| 33 |
-
<h1 class="text-2xl font-bold text-gray-800">SEI DocuMiner
|
| 34 |
-
</div>
|
| 35 |
<nav class="hidden md:flex space-x-6">
|
| 36 |
<a href="#" class="text-blue-600 font-medium">Início</a>
|
| 37 |
<a href="#" class="text-gray-600 hover:text-blue-600">Documentos</a>
|
|
@@ -46,11 +46,11 @@
|
|
| 46 |
|
| 47 |
<main class="container mx-auto px-4 py-12">
|
| 48 |
<section class="text-center mb-16">
|
| 49 |
-
<h2 class="text-4xl font-bold text-gray-900 mb-4">
|
| 50 |
<p class="text-xl text-gray-600 max-w-3xl mx-auto">
|
| 51 |
-
|
| 52 |
</p>
|
| 53 |
-
</section>
|
| 54 |
|
| 55 |
<section class="mb-16">
|
| 56 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
|
@@ -60,28 +60,34 @@
|
|
| 60 |
<input type="file" id="fileInput" class="hidden" accept=".pdf,.docx" multiple>
|
| 61 |
<label for="fileInput" class="flex flex-col items-center justify-center space-y-4 cursor-pointer">
|
| 62 |
<i data-feather="upload" class="w-12 h-12 text-blue-500"></i>
|
| 63 |
-
<h3 class="text-xl font-semibold text-gray-800">Arraste e solte
|
| 64 |
-
<p class="text-gray-500">
|
| 65 |
-
<span class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-lg font-medium transition">
|
| 66 |
Selecionar Arquivos
|
| 67 |
</span>
|
| 68 |
</label>
|
| 69 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
</div>
|
| 71 |
</div>
|
| 72 |
<div class="bg-gray-50 px-8 py-4 border-t border-gray-200">
|
| 73 |
<div class="flex items-center justify-between">
|
| 74 |
-
<span class="text-sm text-gray-500">Formatos suportados: PDF
|
| 75 |
-
<span class="text-sm text-gray-500">
|
| 76 |
-
</div>
|
| 77 |
</div>
|
| 78 |
</div>
|
| 79 |
</section>
|
| 80 |
|
| 81 |
<section class="mb-16">
|
| 82 |
<div class="flex justify-between items-center mb-6">
|
| 83 |
-
<h3 class="text-2xl font-bold text-gray-900">Seus
|
| 84 |
-
<a href="#" class="text-blue-600 hover:underline flex items-center">
|
| 85 |
Ver todos <i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
|
| 86 |
</a>
|
| 87 |
</div>
|
|
@@ -95,16 +101,16 @@
|
|
| 95 |
<i data-feather="file-text" class="text-blue-600 w-5 h-5"></i>
|
| 96 |
</div>
|
| 97 |
<div>
|
| 98 |
-
<h4 class="font-semibold text-gray-800">Processo
|
| 99 |
<p class="text-sm text-gray-500">12/05/2023</p>
|
| 100 |
</div>
|
| 101 |
</div>
|
| 102 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 103 |
-
|
| 104 |
</p>
|
| 105 |
<div class="flex justify-between items-center">
|
| 106 |
-
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">
|
| 107 |
-
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 108 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 109 |
</button>
|
| 110 |
</div>
|
|
@@ -119,16 +125,16 @@
|
|
| 119 |
<i data-feather="file-text" class="text-green-600 w-5 h-5"></i>
|
| 120 |
</div>
|
| 121 |
<div>
|
| 122 |
-
<h4 class="font-semibold text-gray-800">Processo
|
| 123 |
<p class="text-sm text-gray-500">05/06/2023</p>
|
| 124 |
</div>
|
| 125 |
</div>
|
| 126 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 127 |
-
|
| 128 |
</p>
|
| 129 |
<div class="flex justify-between items-center">
|
| 130 |
-
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">
|
| 131 |
-
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 132 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 133 |
</button>
|
| 134 |
</div>
|
|
@@ -143,16 +149,16 @@
|
|
| 143 |
<i data-feather="file-text" class="text-purple-600 w-5 h-5"></i>
|
| 144 |
</div>
|
| 145 |
<div>
|
| 146 |
-
<h4 class="font-semibold text-gray-800">Processo
|
| 147 |
<p class="text-sm text-gray-500">22/07/2023</p>
|
| 148 |
</div>
|
| 149 |
</div>
|
| 150 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 151 |
-
|
| 152 |
</p>
|
| 153 |
<div class="flex justify-between items-center">
|
| 154 |
-
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">
|
| 155 |
-
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 156 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 157 |
</button>
|
| 158 |
</div>
|
|
@@ -164,32 +170,32 @@
|
|
| 164 |
<section class="bg-white rounded-xl shadow-lg p-8 mb-16">
|
| 165 |
<div class="flex flex-col md:flex-row items-center">
|
| 166 |
<div class="md:w-1/2 mb-8 md:mb-0 md:pr-8">
|
| 167 |
-
<h3 class="text-2xl font-bold text-gray-900 mb-4">
|
| 168 |
<p class="text-gray-600 mb-6">
|
| 169 |
-
Nossa tecnologia
|
| 170 |
</p>
|
| 171 |
<div class="space-y-4">
|
| 172 |
<div class="flex items-start">
|
| 173 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 174 |
-
<p class="text-gray-700">
|
| 175 |
</div>
|
| 176 |
<div class="flex items-start">
|
| 177 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 178 |
-
<p class="text-gray-700">
|
| 179 |
</div>
|
| 180 |
<div class="flex items-start">
|
| 181 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 182 |
-
<p class="text-gray-700">
|
| 183 |
</div>
|
| 184 |
</div>
|
| 185 |
-
</div>
|
| 186 |
<div class="md:w-1/2">
|
| 187 |
<div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
|
| 188 |
<div class="mb-4">
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
<button class="absolute right-2 top-2 bg-blue-600 text-white p-2 rounded-lg">
|
| 193 |
<i data-feather="search" class="w-4 h-4"></i>
|
| 194 |
</button>
|
| 195 |
</div>
|
|
@@ -209,17 +215,17 @@
|
|
| 209 |
<div>
|
| 210 |
<h4 class="text-lg font-semibold mb-4">SEI DocuMiner</h4>
|
| 211 |
<p class="text-gray-400 text-sm">
|
| 212 |
-
|
| 213 |
</p>
|
| 214 |
-
</div>
|
| 215 |
<div>
|
| 216 |
<h4 class="text-lg font-semibold mb-4">Recursos</h4>
|
| 217 |
<ul class="space-y-2">
|
| 218 |
-
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Upload de
|
| 219 |
-
<li><a href="#" class="text-gray-400 hover:text-white text-sm">
|
| 220 |
-
<li><a href="#" class="text-gray-400 hover:text-white text-sm">
|
| 221 |
-
<li><a href="#" class="text-gray-400 hover:text-white text-sm">
|
| 222 |
-
</ul>
|
| 223 |
</div>
|
| 224 |
<div>
|
| 225 |
<h4 class="text-lg font-semibold mb-4">Legal</h4>
|
|
@@ -233,9 +239,9 @@
|
|
| 233 |
<h4 class="text-lg font-semibold mb-4">Contato</h4>
|
| 234 |
<ul class="space-y-2">
|
| 235 |
<li class="flex items-center text-gray-400 text-sm"><i data-feather="mail" class="w-4 h-4 mr-2"></i> contato@documiner.com</li>
|
| 236 |
-
<li class="flex items-center text-gray-400 text-sm"><i data-feather="phone" class="w-4 h-4 mr-2"></i>
|
| 237 |
-
<li class="flex items-center text-gray-400 text-sm"><i data-feather="map-pin" class="w-4 h-4 mr-2"></i>
|
| 238 |
-
</ul>
|
| 239 |
</div>
|
| 240 |
</div>
|
| 241 |
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400 text-sm">
|
|
@@ -245,25 +251,106 @@
|
|
| 245 |
</footer>
|
| 246 |
|
| 247 |
<script>
|
| 248 |
-
|
| 249 |
-
|
| 250 |
-
|
| 251 |
-
|
| 252 |
-
|
| 253 |
-
|
| 254 |
-
|
| 255 |
-
|
| 256 |
-
|
| 257 |
-
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
|
| 262 |
-
|
| 263 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 264 |
|
| 265 |
-
|
| 266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 267 |
el: "#vanta-bg",
|
| 268 |
mouseControls: true,
|
| 269 |
touchControls: true,
|
|
@@ -283,17 +370,36 @@ el: "#vanta-bg",
|
|
| 283 |
feather.replace();
|
| 284 |
|
| 285 |
const fileInput = document.getElementById('fileInput');
|
| 286 |
-
|
| 287 |
fileInput.addEventListener('change', function(e) {
|
| 288 |
if (e.target.files.length > 0) {
|
| 289 |
const files = Array.from(e.target.files);
|
| 290 |
-
console.log('
|
| 291 |
-
|
| 292 |
-
|
| 293 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 294 |
});
|
| 295 |
-
|
| 296 |
-
// Drag and drop support
|
| 297 |
const uploadArea = document.querySelector('.file-upload');
|
| 298 |
|
| 299 |
uploadArea.addEventListener('dragover', (e) => {
|
|
@@ -304,18 +410,23 @@ el: "#vanta-bg",
|
|
| 304 |
uploadArea.addEventListener('dragleave', () => {
|
| 305 |
uploadArea.classList.remove('bg-blue-50');
|
| 306 |
});
|
| 307 |
-
|
| 308 |
uploadArea.addEventListener('drop', (e) => {
|
| 309 |
e.preventDefault();
|
| 310 |
uploadArea.classList.remove('bg-blue-50');
|
| 311 |
|
| 312 |
if (e.dataTransfer.files.length) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
fileInput.files = e.dataTransfer.files;
|
| 314 |
const event = new Event('change');
|
| 315 |
fileInput.dispatchEvent(event);
|
| 316 |
}
|
| 317 |
});
|
| 318 |
-
|
| 319 |
</script>
|
| 320 |
</body>
|
| 321 |
</html>
|
|
|
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>SEI DocuMiner - Repositório RAG</title>
|
| 7 |
+
<link rel="icon" type="image/x-icon" href="/static/favicon.ico">
|
| 8 |
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
<script src="https://unpkg.com/feather-icons"></script>
|
|
|
|
| 30 |
<div class="container mx-auto px-4 py-4 flex justify-between items-center">
|
| 31 |
<div class="flex items-center space-x-2">
|
| 32 |
<i data-feather="archive" class="text-blue-600 w-8 h-8"></i>
|
| 33 |
+
<h1 class="text-2xl font-bold text-gray-800">SEI DocuMiner</h1>
|
| 34 |
+
</div>
|
| 35 |
<nav class="hidden md:flex space-x-6">
|
| 36 |
<a href="#" class="text-blue-600 font-medium">Início</a>
|
| 37 |
<a href="#" class="text-gray-600 hover:text-blue-600">Documentos</a>
|
|
|
|
| 46 |
|
| 47 |
<main class="container mx-auto px-4 py-12">
|
| 48 |
<section class="text-center mb-16">
|
| 49 |
+
<h2 class="text-4xl font-bold text-gray-900 mb-4">Transforme processos SEI em conhecimento</h2>
|
| 50 |
<p class="text-xl text-gray-600 max-w-3xl mx-auto">
|
| 51 |
+
Carregue, organize e extraia insights dos documentos do SEI com nosso sistema RAG avançado.
|
| 52 |
</p>
|
| 53 |
+
</section>
|
| 54 |
|
| 55 |
<section class="mb-16">
|
| 56 |
<div class="bg-white rounded-xl shadow-lg overflow-hidden">
|
|
|
|
| 60 |
<input type="file" id="fileInput" class="hidden" accept=".pdf,.docx" multiple>
|
| 61 |
<label for="fileInput" class="flex flex-col items-center justify-center space-y-4 cursor-pointer">
|
| 62 |
<i data-feather="upload" class="w-12 h-12 text-blue-500"></i>
|
| 63 |
+
<h3 class="text-xl font-semibold text-gray-800">Arraste e solte PDFs SEI aqui</h3>
|
| 64 |
+
<p class="text-gray-500">ou clique para selecionar arquivos</p>
|
| 65 |
+
<span class="bg-blue-600 hover:bg-blue-700 text-white px-6 py-2 rounded-lg font-medium transition">
|
| 66 |
Selecionar Arquivos
|
| 67 |
</span>
|
| 68 |
</label>
|
| 69 |
+
<div id="loadingIndicator" class="hidden mt-4">
|
| 70 |
+
<div class="flex items-center space-x-2">
|
| 71 |
+
<i data-feather="loader" class="animate-spin w-5 h-5 text-blue-600"></i>
|
| 72 |
+
<span class="text-gray-600">Preparando para análise...</span>
|
| 73 |
+
</div>
|
| 74 |
+
</div>
|
| 75 |
+
</form>
|
| 76 |
</div>
|
| 77 |
</div>
|
| 78 |
<div class="bg-gray-50 px-8 py-4 border-t border-gray-200">
|
| 79 |
<div class="flex items-center justify-between">
|
| 80 |
+
<span class="text-sm text-gray-500">Formatos suportados: PDF, DOCX</span>
|
| 81 |
+
<span class="text-sm text-gray-500">Tamanho máximo: 50MB</span>
|
| 82 |
+
</div>
|
| 83 |
</div>
|
| 84 |
</div>
|
| 85 |
</section>
|
| 86 |
|
| 87 |
<section class="mb-16">
|
| 88 |
<div class="flex justify-between items-center mb-6">
|
| 89 |
+
<h3 class="text-2xl font-bold text-gray-900">Seus Documentos Recentes</h3>
|
| 90 |
+
<a href="#" class="text-blue-600 hover:underline flex items-center">
|
| 91 |
Ver todos <i data-feather="chevron-right" class="w-4 h-4 ml-1"></i>
|
| 92 |
</a>
|
| 93 |
</div>
|
|
|
|
| 101 |
<i data-feather="file-text" class="text-blue-600 w-5 h-5"></i>
|
| 102 |
</div>
|
| 103 |
<div>
|
| 104 |
+
<h4 class="font-semibold text-gray-800">Processo SEI 12345</h4>
|
| 105 |
<p class="text-sm text-gray-500">12/05/2023</p>
|
| 106 |
</div>
|
| 107 |
</div>
|
| 108 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 109 |
+
Contrato de prestação de serviços técnicos especializados para desenvolvimento de software.
|
| 110 |
</p>
|
| 111 |
<div class="flex justify-between items-center">
|
| 112 |
+
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">Contrato</span>
|
| 113 |
+
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 114 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 115 |
</button>
|
| 116 |
</div>
|
|
|
|
| 125 |
<i data-feather="file-text" class="text-green-600 w-5 h-5"></i>
|
| 126 |
</div>
|
| 127 |
<div>
|
| 128 |
+
<h4 class="font-semibold text-gray-800">Processo SEI 67890</h4>
|
| 129 |
<p class="text-sm text-gray-500">05/06/2023</p>
|
| 130 |
</div>
|
| 131 |
</div>
|
| 132 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 133 |
+
Relatório técnico conclusivo sobre análise de viabilidade de projeto de infraestrutura.
|
| 134 |
</p>
|
| 135 |
<div class="flex justify-between items-center">
|
| 136 |
+
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">Relatório</span>
|
| 137 |
+
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 138 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 139 |
</button>
|
| 140 |
</div>
|
|
|
|
| 149 |
<i data-feather="file-text" class="text-purple-600 w-5 h-5"></i>
|
| 150 |
</div>
|
| 151 |
<div>
|
| 152 |
+
<h4 class="font-semibold text-gray-800">Processo SEI 54321</h4>
|
| 153 |
<p class="text-sm text-gray-500">22/07/2023</p>
|
| 154 |
</div>
|
| 155 |
</div>
|
| 156 |
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 157 |
+
Termo de referência para licitação de serviços de manutenção predial.
|
| 158 |
</p>
|
| 159 |
<div class="flex justify-between items-center">
|
| 160 |
+
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">Licitação</span>
|
| 161 |
+
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 162 |
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 163 |
</button>
|
| 164 |
</div>
|
|
|
|
| 170 |
<section class="bg-white rounded-xl shadow-lg p-8 mb-16">
|
| 171 |
<div class="flex flex-col md:flex-row items-center">
|
| 172 |
<div class="md:w-1/2 mb-8 md:mb-0 md:pr-8">
|
| 173 |
+
<h3 class="text-2xl font-bold text-gray-900 mb-4">Busca Inteligente com RAG</h3>
|
| 174 |
<p class="text-gray-600 mb-6">
|
| 175 |
+
Nossa tecnologia RAG (Retrieval-Augmented Generation) permite que você encontre respostas precisas em seus documentos SEI, combinando busca de informações com geração de respostas contextualizadas.
|
| 176 |
</p>
|
| 177 |
<div class="space-y-4">
|
| 178 |
<div class="flex items-start">
|
| 179 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 180 |
+
<p class="text-gray-700">Extraia cláusulas específicas de contratos</p>
|
| 181 |
</div>
|
| 182 |
<div class="flex items-start">
|
| 183 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 184 |
+
<p class="text-gray-700">Identifique padrões em processos licitatórios</p>
|
| 185 |
</div>
|
| 186 |
<div class="flex items-start">
|
| 187 |
<i data-feather="check-circle" class="text-green-500 w-5 h-5 mt-1 mr-3"></i>
|
| 188 |
+
<p class="text-gray-700">Resuma automaticamente documentos complexos</p>
|
| 189 |
</div>
|
| 190 |
</div>
|
| 191 |
+
</div>
|
| 192 |
<div class="md:w-1/2">
|
| 193 |
<div class="bg-gray-50 rounded-lg p-6 border border-gray-200">
|
| 194 |
<div class="mb-4">
|
| 195 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Pergunte sobre seus documentos</label>
|
| 196 |
+
<div class="relative">
|
| 197 |
+
<input type="text" class="w-full px-4 py-3 rounded-lg border border-gray-300 focus:ring-blue-500 focus:border-blue-500" placeholder="Ex: Qual é o prazo para contestação neste processo?">
|
| 198 |
+
<button class="absolute right-2 top-2 bg-blue-600 text-white p-2 rounded-lg">
|
| 199 |
<i data-feather="search" class="w-4 h-4"></i>
|
| 200 |
</button>
|
| 201 |
</div>
|
|
|
|
| 215 |
<div>
|
| 216 |
<h4 class="text-lg font-semibold mb-4">SEI DocuMiner</h4>
|
| 217 |
<p class="text-gray-400 text-sm">
|
| 218 |
+
Transformando processos burocráticos em conhecimento acionável através de IA.
|
| 219 |
</p>
|
| 220 |
+
</div>
|
| 221 |
<div>
|
| 222 |
<h4 class="text-lg font-semibold mb-4">Recursos</h4>
|
| 223 |
<ul class="space-y-2">
|
| 224 |
+
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Upload de Documentos</a></li>
|
| 225 |
+
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Busca RAG</a></li>
|
| 226 |
+
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Análise de Documentos</a></li>
|
| 227 |
+
<li><a href="#" class="text-gray-400 hover:text-white text-sm">Relatórios Automáticos</a></li>
|
| 228 |
+
</ul>
|
| 229 |
</div>
|
| 230 |
<div>
|
| 231 |
<h4 class="text-lg font-semibold mb-4">Legal</h4>
|
|
|
|
| 239 |
<h4 class="text-lg font-semibold mb-4">Contato</h4>
|
| 240 |
<ul class="space-y-2">
|
| 241 |
<li class="flex items-center text-gray-400 text-sm"><i data-feather="mail" class="w-4 h-4 mr-2"></i> contato@documiner.com</li>
|
| 242 |
+
<li class="flex items-center text-gray-400 text-sm"><i data-feather="phone" class="w-4 h-4 mr-2"></i> (11) 1234-5678</li>
|
| 243 |
+
<li class="flex items-center text-gray-400 text-sm"><i data-feather="map-pin" class="w-4 h-4 mr-2"></i> São Paulo, Brasil</li>
|
| 244 |
+
</ul>
|
| 245 |
</div>
|
| 246 |
</div>
|
| 247 |
<div class="border-t border-gray-800 mt-8 pt-8 text-center text-gray-400 text-sm">
|
|
|
|
| 251 |
</footer>
|
| 252 |
|
| 253 |
<script>
|
| 254 |
+
// PDF Analysis Function with improved feedback
|
| 255 |
+
async function analyzePDF(file) {
|
| 256 |
+
const formData = new FormData();
|
| 257 |
+
formData.append('file', file);
|
| 258 |
+
|
| 259 |
+
try {
|
| 260 |
+
document.getElementById('loadingIndicator').classList.remove('hidden');
|
| 261 |
+
|
| 262 |
+
// Show immediate feedback
|
| 263 |
+
const feedbackDiv = document.createElement('div');
|
| 264 |
+
feedbackDiv.className = 'mt-4 p-3 bg-blue-50 text-blue-800 rounded-lg';
|
| 265 |
+
feedbackDiv.innerHTML = `
|
| 266 |
+
<div class="flex items-center">
|
| 267 |
+
<i data-feather="loader" class="animate-spin w-4 h-4 mr-2"></i>
|
| 268 |
+
<span>Processando ${file.name}...</span>
|
| 269 |
+
</div>
|
| 270 |
+
`;
|
| 271 |
+
document.querySelector('.file-upload').appendChild(feedbackDiv);
|
| 272 |
+
feather.replace();
|
| 273 |
+
|
| 274 |
+
// Simulate processing with delay for demo purposes
|
| 275 |
+
await new Promise(resolve => setTimeout(resolve, 2000 + Math.random() * 3000));
|
| 276 |
+
|
| 277 |
+
// Create mock response
|
| 278 |
+
const mockResponse = {
|
| 279 |
+
status: 'success',
|
| 280 |
+
filename: file.name,
|
| 281 |
+
pageCount: Math.floor(Math.random() * 50) + 1,
|
| 282 |
+
entities: Array(Math.floor(Math.random() * 15)).fill('entity')
|
| 283 |
+
};
|
| 284 |
+
|
| 285 |
+
// Update feedback
|
| 286 |
+
feedbackDiv.className = 'mt-4 p-3 bg-green-50 text-green-800 rounded-lg';
|
| 287 |
+
feedbackDiv.innerHTML = `
|
| 288 |
+
<div class="flex items-center">
|
| 289 |
+
<i data-feather="check-circle" class="text-green-500 w-4 h-4 mr-2"></i>
|
| 290 |
+
<span>Documento processado: ${file.name}</span>
|
| 291 |
+
</div>
|
| 292 |
+
<div class="mt-2 text-sm">
|
| 293 |
+
<p>Páginas: ${mockResponse.pageCount}</p>
|
| 294 |
+
<p>Entidades encontradas: ${mockResponse.entities.length}</p>
|
| 295 |
+
</div>
|
| 296 |
+
`;
|
| 297 |
+
|
| 298 |
+
// Add to recent documents list
|
| 299 |
+
addToRecentDocuments(file.name, mockResponse.pageCount);
|
| 300 |
+
|
| 301 |
+
feather.replace();
|
| 302 |
+
|
| 303 |
+
} catch (error) {
|
| 304 |
+
console.error('Error analyzing PDF:', error);
|
| 305 |
+
const feedbackDiv = document.querySelector('.file-upload div:last-child');
|
| 306 |
+
feedbackDiv.className = 'mt-4 p-3 bg-red-50 text-red-800 rounded-lg';
|
| 307 |
+
feedbackDiv.innerHTML = `
|
| 308 |
+
<div class="flex items-center">
|
| 309 |
+
<i data-feather="alert-circle" class="text-red-500 w-4 h-4 mr-2"></i>
|
| 310 |
+
<span>Erro ao processar ${file.name}</span>
|
| 311 |
+
</div>
|
| 312 |
+
`;
|
| 313 |
+
feather.replace();
|
| 314 |
+
} finally {
|
| 315 |
+
document.getElementById('loadingIndicator').classList.add('hidden');
|
| 316 |
+
}
|
| 317 |
+
}
|
| 318 |
|
| 319 |
+
function addToRecentDocuments(filename, pageCount) {
|
| 320 |
+
const recentDocs = document.querySelector('.grid.grid-cols-1');
|
| 321 |
+
const docTypes = ['Contrato', 'Relatório', 'Licitação', 'Processo', 'Documento'];
|
| 322 |
+
const randomType = docTypes[Math.floor(Math.random() * docTypes.length)];
|
| 323 |
+
|
| 324 |
+
const newDoc = document.createElement('div');
|
| 325 |
+
newDoc.className = 'doc-card bg-white rounded-lg shadow-md overflow-hidden transition duration-300';
|
| 326 |
+
newDoc.innerHTML = `
|
| 327 |
+
<div class="p-6">
|
| 328 |
+
<div class="flex items-center mb-4">
|
| 329 |
+
<div class="bg-blue-100 p-3 rounded-full mr-4">
|
| 330 |
+
<i data-feather="file-text" class="text-blue-600 w-5 h-5"></i>
|
| 331 |
+
</div>
|
| 332 |
+
<div>
|
| 333 |
+
<h4 class="font-semibold text-gray-800">${filename.split('.')[0]}</h4>
|
| 334 |
+
<p class="text-sm text-gray-500">${new Date().toLocaleDateString()}</p>
|
| 335 |
+
</div>
|
| 336 |
+
</div>
|
| 337 |
+
<p class="text-gray-600 text-sm mb-4 line-clamp-2">
|
| 338 |
+
Documento do tipo ${randomType.toLowerCase()} com ${pageCount} páginas.
|
| 339 |
+
</p>
|
| 340 |
+
<div class="flex justify-between items-center">
|
| 341 |
+
<span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">${randomType}</span>
|
| 342 |
+
<button class="text-blue-600 hover:text-blue-800 text-sm font-medium">
|
| 343 |
+
Analisar <i data-feather="arrow-right" class="w-3 h-3 ml-1 inline"></i>
|
| 344 |
+
</button>
|
| 345 |
+
</div>
|
| 346 |
+
</div>
|
| 347 |
+
`;
|
| 348 |
+
|
| 349 |
+
recentDocs.prepend(newDoc);
|
| 350 |
+
feather.replace();
|
| 351 |
+
}
|
| 352 |
+
// Initialize Vanta.js background
|
| 353 |
+
VANTA.NET({
|
| 354 |
el: "#vanta-bg",
|
| 355 |
mouseControls: true,
|
| 356 |
touchControls: true,
|
|
|
|
| 370 |
feather.replace();
|
| 371 |
|
| 372 |
const fileInput = document.getElementById('fileInput');
|
|
|
|
| 373 |
fileInput.addEventListener('change', function(e) {
|
| 374 |
if (e.target.files.length > 0) {
|
| 375 |
const files = Array.from(e.target.files);
|
| 376 |
+
console.log('Files selected:', files);
|
| 377 |
+
|
| 378 |
+
// Clear previous feedback
|
| 379 |
+
const uploadArea = document.querySelector('.file-upload');
|
| 380 |
+
const existingFeedback = uploadArea.querySelectorAll('div[id!="loadingIndicator"]');
|
| 381 |
+
existingFeedback.forEach(el => el.remove());
|
| 382 |
+
|
| 383 |
+
// Analyze each PDF file
|
| 384 |
+
files.forEach(file => {
|
| 385 |
+
if (file.type === 'application/pdf') {
|
| 386 |
+
analyzePDF(file);
|
| 387 |
+
} else {
|
| 388 |
+
const feedbackDiv = document.createElement('div');
|
| 389 |
+
feedbackDiv.className = 'mt-4 p-3 bg-yellow-50 text-yellow-800 rounded-lg';
|
| 390 |
+
feedbackDiv.innerHTML = `
|
| 391 |
+
<div class="flex items-center">
|
| 392 |
+
<i data-feather="alert-triangle" class="text-yellow-500 w-4 h-4 mr-2"></i>
|
| 393 |
+
<span>Formato não suportado: ${file.name}</span>
|
| 394 |
+
</div>
|
| 395 |
+
`;
|
| 396 |
+
uploadArea.appendChild(feedbackDiv);
|
| 397 |
+
feather.replace();
|
| 398 |
+
}
|
| 399 |
+
});
|
| 400 |
+
}
|
| 401 |
});
|
| 402 |
+
// Drag and drop support
|
|
|
|
| 403 |
const uploadArea = document.querySelector('.file-upload');
|
| 404 |
|
| 405 |
uploadArea.addEventListener('dragover', (e) => {
|
|
|
|
| 410 |
uploadArea.addEventListener('dragleave', () => {
|
| 411 |
uploadArea.classList.remove('bg-blue-50');
|
| 412 |
});
|
|
|
|
| 413 |
uploadArea.addEventListener('drop', (e) => {
|
| 414 |
e.preventDefault();
|
| 415 |
uploadArea.classList.remove('bg-blue-50');
|
| 416 |
|
| 417 |
if (e.dataTransfer.files.length) {
|
| 418 |
+
const files = Array.from(e.dataTransfer.files);
|
| 419 |
+
|
| 420 |
+
// Clear previous feedback
|
| 421 |
+
const existingFeedback = uploadArea.querySelectorAll('div[id!="loadingIndicator"]');
|
| 422 |
+
existingFeedback.forEach(el => el.remove());
|
| 423 |
+
|
| 424 |
fileInput.files = e.dataTransfer.files;
|
| 425 |
const event = new Event('change');
|
| 426 |
fileInput.dispatchEvent(event);
|
| 427 |
}
|
| 428 |
});
|
| 429 |
+
});
|
| 430 |
</script>
|
| 431 |
</body>
|
| 432 |
</html>
|