Tôi muốn sắp xếp theo chiều dọc, Kể cả 4 ô output. Xếp hết ở dưới so với vùng input. Bỏ phần Advanced Setting đi. - Initial Deployment
Browse files- README.md +7 -5
- index.html +363 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 1 |
---
|
| 2 |
+
title: cvscanner
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: purple
|
| 5 |
+
colorTo: green
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite
|
| 10 |
---
|
| 11 |
|
| 12 |
+
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
index.html
CHANGED
|
@@ -1,19 +1,363 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en" class="scroll-smooth">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>AI CV Summarizer | Smart Document Analysis</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 9 |
+
<style>
|
| 10 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 11 |
+
body {
|
| 12 |
+
font-family: 'Inter', sans-serif;
|
| 13 |
+
background-color: #f8fafc;
|
| 14 |
+
}
|
| 15 |
+
.file-upload:hover {
|
| 16 |
+
transform: translateY(-2px);
|
| 17 |
+
box-shadow: 0 10px 20px -5px rgba(79, 70, 229, 0.2);
|
| 18 |
+
}
|
| 19 |
+
.summary-area {
|
| 20 |
+
min-height: 200px;
|
| 21 |
+
transition: all 0.3s ease;
|
| 22 |
+
}
|
| 23 |
+
.radio-custom {
|
| 24 |
+
-webkit-appearance: none;
|
| 25 |
+
-moz-appearance: none;
|
| 26 |
+
appearance: none;
|
| 27 |
+
width: 16px;
|
| 28 |
+
height: 16px;
|
| 29 |
+
border: 2px solid #e2e8f0;
|
| 30 |
+
border-radius: 50%;
|
| 31 |
+
outline: none;
|
| 32 |
+
cursor: pointer;
|
| 33 |
+
transition: all 0.2s;
|
| 34 |
+
}
|
| 35 |
+
.radio-custom:checked {
|
| 36 |
+
border-color: #4f46e5;
|
| 37 |
+
background-color: #4f46e5;
|
| 38 |
+
background-image: radial-gradient(circle, white 35%, transparent 40%);
|
| 39 |
+
}
|
| 40 |
+
.drag-active {
|
| 41 |
+
border-color: #4f46e5;
|
| 42 |
+
background-color: #eef2ff;
|
| 43 |
+
}
|
| 44 |
+
</style>
|
| 45 |
+
</head>
|
| 46 |
+
<body>
|
| 47 |
+
<div class="min-h-screen flex flex-col">
|
| 48 |
+
<!-- Header -->
|
| 49 |
+
<header class="bg-gradient-to-r from-indigo-600 to-purple-600 text-white py-8 px-4 shadow-lg">
|
| 50 |
+
<div class="container mx-auto max-w-6xl">
|
| 51 |
+
<div class="flex flex-col md:flex-row items-center justify-between gap-6">
|
| 52 |
+
<div>
|
| 53 |
+
<h1 class="text-3xl md:text-4xl font-bold mb-2 flex items-center gap-3">
|
| 54 |
+
<i class="fas fa-brain"></i> AI CV Summarizer
|
| 55 |
+
</h1>
|
| 56 |
+
<p class="text-indigo-100 opacity-90">Extract key insights from documents in seconds</p>
|
| 57 |
+
</div>
|
| 58 |
+
<div class="flex items-center gap-4">
|
| 59 |
+
<span class="px-3 py-1 bg-white/20 rounded-full text-sm flex items-center gap-2">
|
| 60 |
+
<i class="fas fa-bolt text-yellow-300"></i> Powered by Gemini 2.5
|
| 61 |
+
</span>
|
| 62 |
+
</div>
|
| 63 |
+
</div>
|
| 64 |
+
</div>
|
| 65 |
+
</header>
|
| 66 |
+
|
| 67 |
+
<!-- Main Content -->
|
| 68 |
+
<main class="flex-1 py-8 px-4">
|
| 69 |
+
<div class="container mx-auto max-w-6xl">
|
| 70 |
+
<div class="flex flex-col gap-8">
|
| 71 |
+
<!-- Upload Section -->
|
| 72 |
+
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100">
|
| 73 |
+
<h2 class="text-xl font-semibold mb-4 text-gray-800 flex items-center gap-2">
|
| 74 |
+
<i class="fas fa-cloud-upload-alt text-indigo-500"></i> Upload Your Document
|
| 75 |
+
</h2>
|
| 76 |
+
|
| 77 |
+
<div class="flex mb-4 gap-2">
|
| 78 |
+
<button id="tabPdf" class="flex-1 py-2 px-4 rounded-lg border border-indigo-500 text-indigo-500 font-medium bg-indigo-50">PDF Upload</button>
|
| 79 |
+
<button id="tabText" class="flex-1 py-2 px-4 rounded-lg border border-gray-300 text-gray-500 font-medium">Text Input</button>
|
| 80 |
+
</div>
|
| 81 |
+
|
| 82 |
+
<div id="pdfSection">
|
| 83 |
+
<div id="dropZone" class="file-upload border-2 border-dashed border-gray-300 rounded-lg p-8 text-center cursor-pointer transition-all duration-300 mb-6">
|
| 84 |
+
<div class="flex flex-col items-center justify-center">
|
| 85 |
+
<i class="fas fa-file-pdf text-5xl text-indigo-400 mb-4"></i>
|
| 86 |
+
<input type="file" id="fileInput" class="hidden" accept=".pdf" />
|
| 87 |
+
<button id="uploadBtn" class="bg-indigo-600 hover:bg-indigo-700 text-white px-6 py-2 rounded-lg font-medium mb-2 transition-colors duration-300">
|
| 88 |
+
Select PDF File
|
| 89 |
+
</button>
|
| 90 |
+
<p class="text-gray-500 text-sm">or drag and drop here</p>
|
| 91 |
+
<p class="text-gray-400 text-xs mt-2">PDF up to 10MB</p>
|
| 92 |
+
</div>
|
| 93 |
+
</div>
|
| 94 |
+
</div>
|
| 95 |
+
|
| 96 |
+
<div id="textSection" class="hidden">
|
| 97 |
+
<textarea id="cvTextInput" class="w-full h-40 p-4 border border-gray-300 rounded-lg mb-4 focus:border-indigo-500 focus:ring-indigo-500" placeholder="Paste your CV content here..."></textarea>
|
| 98 |
+
</div>
|
| 99 |
+
|
| 100 |
+
<div class="mb-4">
|
| 101 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Job Description (JD)</label>
|
| 102 |
+
<textarea id="jdTextInput" class="w-full h-40 p-4 border border-gray-300 rounded-lg mb-4 focus:border-indigo-500 focus:ring-indigo-500" placeholder="Paste the job description here..."></textarea>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="space-y-5">
|
| 106 |
+
<div>
|
| 107 |
+
<label class="block text-sm font-medium text-gray-700 mb-1">Output Language</label>
|
| 108 |
+
<select class="w-full rounded-lg border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 shadow-sm">
|
| 109 |
+
<option selected>Vietnamese</option>
|
| 110 |
+
<option>English</option>
|
| 111 |
+
<option>Spanish</option>
|
| 112 |
+
<option>French</option>
|
| 113 |
+
<option>German</option>
|
| 114 |
+
<option>Chinese</option>
|
| 115 |
+
</select>
|
| 116 |
+
</div>
|
| 117 |
+
|
| 118 |
+
<div>
|
| 119 |
+
<label class="block text-sm font-medium text-gray-700 mb-2">Summary Length</label>
|
| 120 |
+
<div class="flex items-center gap-4">
|
| 121 |
+
<label class="flex items-center gap-2 cursor-pointer">
|
| 122 |
+
<input type="radio" name="summaryLength" class="radio-custom" checked>
|
| 123 |
+
<span class="text-sm">Short (~100 words)</span>
|
| 124 |
+
</label>
|
| 125 |
+
<label class="flex items-center gap-2 cursor-pointer">
|
| 126 |
+
<input type="radio" name="summaryLength" class="radio-custom">
|
| 127 |
+
<span class="text-sm">Medium (~250 words)</span>
|
| 128 |
+
</label>
|
| 129 |
+
<label class="flex items-center gap-2 cursor-pointer">
|
| 130 |
+
<input type="radio" name="summaryLength" class="radio-custom">
|
| 131 |
+
<span class="text-sm">Long (~500 words)</span>
|
| 132 |
+
</label>
|
| 133 |
+
</div>
|
| 134 |
+
</div>
|
| 135 |
+
</div>
|
| 136 |
+
|
| 137 |
+
<button id="processBtn" class="mt-8 w-full bg-indigo-600 hover:bg-indigo-700 text-white py-3 px-4 rounded-lg font-medium flex items-center justify-center gap-2 transition-colors duration-300 disabled:opacity-50 disabled:cursor-not-allowed" disabled>
|
| 138 |
+
<i class="fas fa-magic"></i> Generate Summary
|
| 139 |
+
</button>
|
| 140 |
+
</div>
|
| 141 |
+
|
| 142 |
+
<!-- Output Sections -->
|
| 143 |
+
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto">
|
| 144 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2">
|
| 145 |
+
<i class="fas fa-file-alt text-indigo-500"></i> Extracted CV Content
|
| 146 |
+
</h3>
|
| 147 |
+
<div id="extractedContent" class="text-gray-700 text-sm overflow-auto">
|
| 148 |
+
<div class="text-center py-12 text-gray-400">
|
| 149 |
+
<i class="fas fa-file-import text-4xl mb-3"></i>
|
| 150 |
+
<p>Upload your CV or paste text to see extracted content</p>
|
| 151 |
+
</div>
|
| 152 |
+
</div>
|
| 153 |
+
</div>
|
| 154 |
+
|
| 155 |
+
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto">
|
| 156 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2">
|
| 157 |
+
<i class="fas fa-briefcase text-indigo-500"></i> Job Description
|
| 158 |
+
</h3>
|
| 159 |
+
<div id="jdContent" class="text-gray-700 overflow-auto">
|
| 160 |
+
<div class="text-center py-12 text-gray-400">
|
| 161 |
+
<i class="fas fa-align-left text-4xl mb-3"></i>
|
| 162 |
+
<p>Enter job description on the left to see it here</p>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto">
|
| 168 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2">
|
| 169 |
+
<i class="fas fa-robot text-indigo-500"></i> AI-Generated Summary
|
| 170 |
+
</h3>
|
| 171 |
+
<div id="aiSummary" class="text-gray-700 overflow-auto">
|
| 172 |
+
<div class="text-center py-12 text-gray-400">
|
| 173 |
+
<i class="fas fa-spinner fa-spin text-4xl mb-3"></i>
|
| 174 |
+
<p>Your summary will appear here after processing...</p>
|
| 175 |
+
</div>
|
| 176 |
+
</div>
|
| 177 |
+
</div>
|
| 178 |
+
|
| 179 |
+
<div class="bg-white rounded-xl shadow-lg p-6 border border-gray-100 overflow-auto">
|
| 180 |
+
<h3 class="text-lg font-semibold mb-4 text-gray-800 flex items-center gap-2">
|
| 181 |
+
<i class="fas fa-project-diagram text-indigo-500"></i> CV-JD Match Analysis
|
| 182 |
+
</h3>
|
| 183 |
+
<div id="matchAnalysis" class="text-gray-700 overflow-auto">
|
| 184 |
+
<div class="text-center py-12 text-gray-400">
|
| 185 |
+
<i class="fas fa-search text-4xl mb-3"></i>
|
| 186 |
+
<p>Analysis of CV-JD match will appear here</p>
|
| 187 |
+
</div>
|
| 188 |
+
</div>
|
| 189 |
+
</div>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
</main>
|
| 193 |
+
|
| 194 |
+
<!-- Footer -->
|
| 195 |
+
<footer class="bg-gray-50 py-6 text-center text-gray-500 text-sm border-t border-gray-200">
|
| 196 |
+
<div class="container mx-auto max-w-6xl px-4">
|
| 197 |
+
<p>© 2023 AI CV Summarizer. All rights reserved.</p>
|
| 198 |
+
<p class="mt-1 flex items-center justify-center gap-2">
|
| 199 |
+
<span>This service may use your files to improve the AI model.</span>
|
| 200 |
+
<a href="https://github.com/username/repo/issues/new" target="_blank" class="text-indigo-600 hover:text-indigo-800">
|
| 201 |
+
<i class="fas fa-bug"></i> Report Bug
|
| 202 |
+
</a>
|
| 203 |
+
</p>
|
| 204 |
+
</div>
|
| 205 |
+
</footer>
|
| 206 |
+
</div>
|
| 207 |
+
|
| 208 |
+
<script>
|
| 209 |
+
// File Upload and Drag & Drop
|
| 210 |
+
const dropZone = document.getElementById('dropZone');
|
| 211 |
+
const fileInput = document.getElementById('fileInput');
|
| 212 |
+
const uploadBtn = document.getElementById('uploadBtn');
|
| 213 |
+
const processBtn = document.getElementById('processBtn');
|
| 214 |
+
|
| 215 |
+
uploadBtn.addEventListener('click', () => fileInput.click());
|
| 216 |
+
|
| 217 |
+
fileInput.addEventListener('change', (e) => {
|
| 218 |
+
if (e.target.files.length) {
|
| 219 |
+
handleFile(e.target.files[0]);
|
| 220 |
+
}
|
| 221 |
+
});
|
| 222 |
+
|
| 223 |
+
['dragenter', 'dragover', 'dragleave', 'drop'].forEach(eventName => {
|
| 224 |
+
dropZone.addEventListener(eventName, preventDefaults, false);
|
| 225 |
+
});
|
| 226 |
+
|
| 227 |
+
function preventDefaults(e) {
|
| 228 |
+
e.preventDefault();
|
| 229 |
+
e.stopPropagation();
|
| 230 |
+
}
|
| 231 |
+
|
| 232 |
+
['dragenter', 'dragover'].forEach(eventName => {
|
| 233 |
+
dropZone.addEventListener(eventName, highlight, false);
|
| 234 |
+
});
|
| 235 |
+
|
| 236 |
+
['dragleave', 'drop'].forEach(eventName => {
|
| 237 |
+
dropZone.addEventListener(eventName, unhighlight, false);
|
| 238 |
+
});
|
| 239 |
+
|
| 240 |
+
function highlight() {
|
| 241 |
+
dropZone.classList.add('drag-active');
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
function unhighlight() {
|
| 245 |
+
dropZone.classList.remove('drag-active');
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
dropZone.addEventListener('drop', (e) => {
|
| 249 |
+
const dt = e.dataTransfer;
|
| 250 |
+
const file = dt.files[0];
|
| 251 |
+
handleFile(file);
|
| 252 |
+
});
|
| 253 |
+
|
| 254 |
+
function handleFile(file) {
|
| 255 |
+
if (file.type !== 'application/pdf') {
|
| 256 |
+
alert('Please upload a PDF file');
|
| 257 |
+
return;
|
| 258 |
+
}
|
| 259 |
+
if (file.size > 10 * 1024 * 1024) { // 10MB
|
| 260 |
+
alert('File is too large. Maximum size is 10MB');
|
| 261 |
+
return;
|
| 262 |
+
}
|
| 263 |
+
|
| 264 |
+
// Enable process button
|
| 265 |
+
processBtn.disabled = false;
|
| 266 |
+
|
| 267 |
+
// Show file info
|
| 268 |
+
const extractedContent = document.getElementById('extractedContent');
|
| 269 |
+
extractedContent.innerHTML = `
|
| 270 |
+
<div class="flex items-start gap-4 mb-4">
|
| 271 |
+
<i class="fas fa-file-pdf text-red-500 mt-1"></i>
|
| 272 |
+
<div>
|
| 273 |
+
<h4 class="font-medium">${file.name}</h4>
|
| 274 |
+
<p class="text-xs text-gray-500">${(file.size / (1024 * 1024)).toFixed(2)} MB</p>
|
| 275 |
+
</div>
|
| 276 |
+
</div>
|
| 277 |
+
<p class="text-green-600 text-sm"><i class="fas fa-check-circle"></i> Ready to process</p>
|
| 278 |
+
`;
|
| 279 |
+
|
| 280 |
+
// Here you would typically read the PDF content, but that would require a PDF parsing library
|
| 281 |
+
// For demo purposes, we'll simulate this with a setTimeout in the process button handler
|
| 282 |
+
}
|
| 283 |
+
|
| 284 |
+
// Process Button Handler
|
| 285 |
+
processBtn.addEventListener('click', () => {
|
| 286 |
+
const aiSummary = document.getElementById('aiSummary');
|
| 287 |
+
aiSummary.innerHTML = `
|
| 288 |
+
<div class="text-center py-8">
|
| 289 |
+
<i class="fas fa-spinner fa-spin text-4xl mb-3 text-indigo-500"></i>
|
| 290 |
+
<p class="text-gray-600">Generating your summary...</p>
|
| 291 |
+
</div>
|
| 292 |
+
`;
|
| 293 |
+
|
| 294 |
+
// Simulate API call
|
| 295 |
+
setTimeout(() => {
|
| 296 |
+
// This would be replaced with actual API call to your backend
|
| 297 |
+
const sampleSummary = `
|
| 298 |
+
<div class="space-y-4">
|
| 299 |
+
<div class="p-4 bg-indigo-50 rounded-lg">
|
| 300 |
+
<h4 class="font-medium text-indigo-700 flex items-center gap-2"><i class="fas fa-user-graduate"></i> Education</h4>
|
| 301 |
+
<p class="text-sm mt-1">Bachelor's in Computer Science from XYZ University (2015-2019)</p>
|
| 302 |
+
</div>
|
| 303 |
+
<div class="p-4 bg-green-50 rounded-lg">
|
| 304 |
+
<h4 class="font-medium text-green-700 flex items-center gap-2"><i class="fas fa-briefcase"></i> Experience</h4>
|
| 305 |
+
<p class="text-sm mt-1">3 years as a Software Engineer at ABC Company, specialized in web development and UI design.</p>
|
| 306 |
+
</div>
|
| 307 |
+
<div class="p-4 bg-blue-50 rounded-lg">
|
| 308 |
+
<h4 class="font-medium text-blue-700 flex items-center gap-2"><i class="fas fa-code"></i> Skills</h4>
|
| 309 |
+
<p class="text-sm mt-1">JavaScript, React, Node.js, Python, SQL, Git, Agile Methodologies</p>
|
| 310 |
+
</div>
|
| 311 |
+
</div>
|
| 312 |
+
`;
|
| 313 |
+
aiSummary.innerHTML = sampleSummary;
|
| 314 |
+
}, 2500);
|
| 315 |
+
});
|
| 316 |
+
// Tab switching between PDF and Text input
|
| 317 |
+
const tabPdf = document.getElementById('tabPdf');
|
| 318 |
+
const tabText = document.getElementById('tabText');
|
| 319 |
+
const pdfSection = document.getElementById('pdfSection');
|
| 320 |
+
const textSection = document.getElementById('textSection');
|
| 321 |
+
const cvTextInput = document.getElementById('cvTextInput');
|
| 322 |
+
|
| 323 |
+
tabPdf.addEventListener('click', () => {
|
| 324 |
+
pdfSection.classList.remove('hidden');
|
| 325 |
+
textSection.classList.add('hidden');
|
| 326 |
+
tabPdf.classList.add('border-indigo-500', 'text-indigo-500', 'bg-indigo-50');
|
| 327 |
+
tabPdf.classList.remove('border-gray-300', 'text-gray-500');
|
| 328 |
+
tabText.classList.add('border-gray-300', 'text-gray-500');
|
| 329 |
+
tabText.classList.remove('border-indigo-500', 'text-indigo-500', 'bg-indigo-50');
|
| 330 |
+
});
|
| 331 |
+
|
| 332 |
+
tabText.addEventListener('click', () => {
|
| 333 |
+
pdfSection.classList.add('hidden');
|
| 334 |
+
textSection.classList.remove('hidden');
|
| 335 |
+
tabText.classList.add('border-indigo-500', 'text-indigo-500', 'bg-indigo-50');
|
| 336 |
+
tabText.classList.remove('border-gray-300', 'text-gray-500');
|
| 337 |
+
tabPdf.classList.add('border-gray-300', 'text-gray-500');
|
| 338 |
+
tabPdf.classList.remove('border-indigo-500', 'text-indigo-500', 'bg-indigo-50');
|
| 339 |
+
});
|
| 340 |
+
|
| 341 |
+
// JD text input handler
|
| 342 |
+
const jdTextInput = document.getElementById('jdTextInput');
|
| 343 |
+
const jdContent = document.getElementById('jdContent');
|
| 344 |
+
|
| 345 |
+
jdTextInput.addEventListener('input', () => {
|
| 346 |
+
if (jdTextInput.value.trim()) {
|
| 347 |
+
jdContent.innerHTML = `
|
| 348 |
+
<div class="prose max-w-none">
|
| 349 |
+
<pre class="whitespace-pre-wrap">${jdTextInput.value}</pre>
|
| 350 |
+
</div>
|
| 351 |
+
`;
|
| 352 |
+
} else {
|
| 353 |
+
jdContent.innerHTML = `
|
| 354 |
+
<div class="text-center py-12 text-gray-400">
|
| 355 |
+
<i class="fas fa-align-left text-4xl mb-3"></i>
|
| 356 |
+
<p>Enter job description on the left to see it here</p>
|
| 357 |
+
</div>
|
| 358 |
+
`;
|
| 359 |
+
}
|
| 360 |
+
});
|
| 361 |
+
</script>
|
| 362 |
+
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=Grzimo/cvscanner" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 363 |
+
</html>
|