Spaces:
Running
Running
Add 2 files
Browse files- README.md +6 -4
- index.html +540 -19
README.md
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
---
|
| 2 |
-
title:
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
colorTo: purple
|
| 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: ynov-cv
|
| 3 |
+
emoji: 🐳
|
| 4 |
+
colorFrom: green
|
| 5 |
colorTo: purple
|
| 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,540 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="fr">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Ynov CV Analyzer - Ycampers</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 8 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 9 |
+
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
| 10 |
+
<style>
|
| 11 |
+
.gradient-bg {
|
| 12 |
+
background: linear-gradient(135deg, #4bb7a9 0%, #3a9a8d 100%);
|
| 13 |
+
}
|
| 14 |
+
.progress-bar {
|
| 15 |
+
height: 20px;
|
| 16 |
+
border-radius: 10px;
|
| 17 |
+
background-color: #e5e7eb;
|
| 18 |
+
overflow: hidden;
|
| 19 |
+
}
|
| 20 |
+
.progress-fill {
|
| 21 |
+
height: 100%;
|
| 22 |
+
transition: width 0.5s ease-in-out;
|
| 23 |
+
}
|
| 24 |
+
.pulse {
|
| 25 |
+
animation: pulse 2s infinite;
|
| 26 |
+
}
|
| 27 |
+
@keyframes pulse {
|
| 28 |
+
0% { box-shadow: 0 0 0 0 rgba(75, 183, 169, 0.7); }
|
| 29 |
+
70% { box-shadow: 0 0 0 10px rgba(75, 183, 169, 0); }
|
| 30 |
+
100% { box-shadow: 0 0 0 0 rgba(75, 183, 169, 0); }
|
| 31 |
+
}
|
| 32 |
+
.floating {
|
| 33 |
+
animation: floating 3s ease-in-out infinite;
|
| 34 |
+
}
|
| 35 |
+
@keyframes floating {
|
| 36 |
+
0% { transform: translateY(0px); }
|
| 37 |
+
50% { transform: translateY(-10px); }
|
| 38 |
+
100% { transform: translateY(0px); }
|
| 39 |
+
}
|
| 40 |
+
</style>
|
| 41 |
+
</head>
|
| 42 |
+
<body class="bg-gray-50 font-sans">
|
| 43 |
+
<!-- Header -->
|
| 44 |
+
<header class="gradient-bg text-white shadow-lg">
|
| 45 |
+
<div class="container mx-auto px-4 py-6 flex justify-between items-center">
|
| 46 |
+
<div class="flex items-center space-x-4">
|
| 47 |
+
<img src="https://privacy.ynov.com/img/logo_ynov_campus.svg" alt="Ynov Campus" class="h-12">
|
| 48 |
+
<h1 class="text-2xl font-bold">Ynov CV Analyzer</h1>
|
| 49 |
+
</div>
|
| 50 |
+
<div class="hidden md:block">
|
| 51 |
+
<span class="bg-white text-[#4bb7a9] px-4 py-2 rounded-full font-semibold">Ycampers 2025</span>
|
| 52 |
+
</div>
|
| 53 |
+
</div>
|
| 54 |
+
</header>
|
| 55 |
+
|
| 56 |
+
<!-- Main Content -->
|
| 57 |
+
<main class="container mx-auto px-4 py-8">
|
| 58 |
+
<div class="max-w-4xl mx-auto">
|
| 59 |
+
<!-- Upload Section -->
|
| 60 |
+
<section class="bg-white rounded-xl shadow-md p-6 mb-8">
|
| 61 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4">Analyse ton CV</h2>
|
| 62 |
+
<p class="text-gray-600 mb-6">Télécharge ton CV pour obtenir une analyse détaillée de son contenu et de sa forme, avec des conseils pour l'améliorer.</p>
|
| 63 |
+
|
| 64 |
+
<div id="upload-container" class="border-2 border-dashed border-[#4bb7a9] rounded-xl p-8 text-center cursor-pointer hover:bg-gray-50 transition">
|
| 65 |
+
<div class="floating text-[#4bb7a9] mb-4">
|
| 66 |
+
<i class="fas fa-file-upload text-5xl"></i>
|
| 67 |
+
</div>
|
| 68 |
+
<p class="font-semibold text-gray-700">Glisse-dépose ton CV ici ou clique pour sélectionner</p>
|
| 69 |
+
<p class="text-sm text-gray-500 mt-2">Formats supportés: PDF, DOC, DOCX (max 5MB)</p>
|
| 70 |
+
<input type="file" id="cv-upload" class="hidden" accept=".pdf,.doc,.docx">
|
| 71 |
+
</div>
|
| 72 |
+
|
| 73 |
+
<div id="uploading" class="hidden text-center py-8">
|
| 74 |
+
<div class="inline-block animate-spin rounded-full h-12 w-12 border-t-2 border-b-2 border-[#4bb7a9] mb-4"></div>
|
| 75 |
+
<p class="text-gray-700">Analyse en cours avec Deepseek AI...</p>
|
| 76 |
+
</div>
|
| 77 |
+
</section>
|
| 78 |
+
|
| 79 |
+
<!-- Results Section -->
|
| 80 |
+
<section id="results-section" class="hidden bg-white rounded-xl shadow-md p-6 mb-8">
|
| 81 |
+
<div class="flex justify-between items-center mb-6">
|
| 82 |
+
<h2 class="text-2xl font-bold text-gray-800">Résultats de l'analyse</h2>
|
| 83 |
+
<div id="score-display" class="flex items-center">
|
| 84 |
+
<div class="text-3xl font-bold mr-2">0%</div>
|
| 85 |
+
<div class="text-sm text-gray-500">Score global</div>
|
| 86 |
+
</div>
|
| 87 |
+
</div>
|
| 88 |
+
|
| 89 |
+
<!-- Score Card -->
|
| 90 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6 mb-8">
|
| 91 |
+
<div class="bg-gray-50 rounded-lg p-6">
|
| 92 |
+
<h3 class="font-semibold text-gray-700 mb-4">Détail du score</h3>
|
| 93 |
+
<div class="space-y-4">
|
| 94 |
+
<div>
|
| 95 |
+
<div class="flex justify-between mb-1">
|
| 96 |
+
<span class="text-sm font-medium text-gray-600">Contenu</span>
|
| 97 |
+
<span class="text-sm font-medium text-gray-600" id="content-score">0%</span>
|
| 98 |
+
</div>
|
| 99 |
+
<div class="progress-bar">
|
| 100 |
+
<div id="content-fill" class="progress-fill bg-red-500" style="width: 0%"></div>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
<div>
|
| 104 |
+
<div class="flex justify-between mb-1">
|
| 105 |
+
<span class="text-sm font-medium text-gray-600">Forme</span>
|
| 106 |
+
<span class="text-sm font-medium text-gray-600" id="form-score">0%</span>
|
| 107 |
+
</div>
|
| 108 |
+
<div class="progress-bar">
|
| 109 |
+
<div id="form-fill" class="progress-fill bg-red-500" style="width: 0%"></div>
|
| 110 |
+
</div>
|
| 111 |
+
</div>
|
| 112 |
+
<div>
|
| 113 |
+
<div class="flex justify-between mb-1">
|
| 114 |
+
<span class="text-sm font-medium text-gray-600">Clarté</span>
|
| 115 |
+
<span class="text-sm font-medium text-gray-600" id="clarity-score">0%</span>
|
| 116 |
+
</div>
|
| 117 |
+
<div class="progress-bar">
|
| 118 |
+
<div id="clarity-fill" class="progress-fill bg-red-500" style="width: 0%"></div>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
<div>
|
| 122 |
+
<div class="flex justify-between mb-1">
|
| 123 |
+
<span class="text-sm font-medium text-gray-600">Pertinence</span>
|
| 124 |
+
<span class="text-sm font-medium text-gray-600" id="relevance-score">0%</span>
|
| 125 |
+
</div>
|
| 126 |
+
<div class="progress-bar">
|
| 127 |
+
<div id="relevance-fill" class="progress-fill bg-red-500" style="width: 0%"></div>
|
| 128 |
+
</div>
|
| 129 |
+
</div>
|
| 130 |
+
</div>
|
| 131 |
+
</div>
|
| 132 |
+
|
| 133 |
+
<div class="bg-gray-50 rounded-lg p-6">
|
| 134 |
+
<h3 class="font-semibold text-gray-700 mb-4">Visualisation du score</h3>
|
| 135 |
+
<canvas id="score-chart" height="200"></canvas>
|
| 136 |
+
</div>
|
| 137 |
+
</div>
|
| 138 |
+
|
| 139 |
+
<!-- Recommendations -->
|
| 140 |
+
<div class="bg-[#f8fafc] border border-[#e2e8f0] rounded-lg p-6">
|
| 141 |
+
<h3 class="font-semibold text-gray-700 mb-4 flex items-center">
|
| 142 |
+
<i class="fas fa-lightbulb text-[#4bb7a9] mr-2"></i>
|
| 143 |
+
Recommandations pour améliorer ton CV
|
| 144 |
+
</h3>
|
| 145 |
+
<div id="recommendations" class="space-y-3">
|
| 146 |
+
<!-- Dynamically filled by JS -->
|
| 147 |
+
</div>
|
| 148 |
+
</div>
|
| 149 |
+
</section>
|
| 150 |
+
|
| 151 |
+
<!-- AI Analysis -->
|
| 152 |
+
<section id="ai-analysis" class="hidden bg-white rounded-xl shadow-md p-6">
|
| 153 |
+
<h2 class="text-2xl font-bold text-gray-800 mb-4">Analyse approfondie par Deepseek AI</h2>
|
| 154 |
+
<div class="bg-[#4bb7a9] bg-opacity-10 border-l-4 border-[#4bb7a9] p-4 mb-6">
|
| 155 |
+
<div class="flex">
|
| 156 |
+
<div class="flex-shrink-0">
|
| 157 |
+
<i class="fas fa-robot text-[#4bb7a9]"></i>
|
| 158 |
+
</div>
|
| 159 |
+
<div class="ml-3">
|
| 160 |
+
<p id="ai-feedback" class="text-sm text-gray-700">
|
| 161 |
+
<!-- AI feedback will be inserted here -->
|
| 162 |
+
</p>
|
| 163 |
+
</div>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
|
| 167 |
+
<div class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
| 168 |
+
<div>
|
| 169 |
+
<h3 class="font-semibold text-gray-700 mb-3">Points forts</h3>
|
| 170 |
+
<ul id="strengths" class="space-y-2">
|
| 171 |
+
<!-- Strengths will be inserted here -->
|
| 172 |
+
</ul>
|
| 173 |
+
</div>
|
| 174 |
+
<div>
|
| 175 |
+
<h3 class="font-semibold text-gray-700 mb-3">Points à améliorer</h3>
|
| 176 |
+
<ul id="weaknesses" class="space-y-2">
|
| 177 |
+
<!-- Weaknesses will be inserted here -->
|
| 178 |
+
</ul>
|
| 179 |
+
</div>
|
| 180 |
+
</div>
|
| 181 |
+
</section>
|
| 182 |
+
</div>
|
| 183 |
+
</main>
|
| 184 |
+
|
| 185 |
+
<!-- Footer -->
|
| 186 |
+
<footer class="gradient-bg text-white py-6">
|
| 187 |
+
<div class="container mx-auto px-4">
|
| 188 |
+
<div class="flex flex-col md:flex-row justify-between items-center">
|
| 189 |
+
<div class="mb-4 md:mb-0">
|
| 190 |
+
<img src="https://privacy.ynov.com/img/logo_ynov_campus.svg" alt="Ynov Campus" class="h-8">
|
| 191 |
+
</div>
|
| 192 |
+
<div class="text-center md:text-right">
|
| 193 |
+
<p class="text-sm">© YNOV Campus 2025 - Tous droits réservés</p>
|
| 194 |
+
<p class="text-xs opacity-75 mt-1">Analyseur de CV pour Ycampers - Powered by Deepseek AI</p>
|
| 195 |
+
</div>
|
| 196 |
+
</div>
|
| 197 |
+
</div>
|
| 198 |
+
</footer>
|
| 199 |
+
|
| 200 |
+
<script>
|
| 201 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 202 |
+
// Elements
|
| 203 |
+
const uploadContainer = document.getElementById('upload-container');
|
| 204 |
+
const fileInput = document.getElementById('cv-upload');
|
| 205 |
+
const uploadingDiv = document.getElementById('uploading');
|
| 206 |
+
const resultsSection = document.getElementById('results-section');
|
| 207 |
+
const aiAnalysisSection = document.getElementById('ai-analysis');
|
| 208 |
+
|
| 209 |
+
// Upload handling
|
| 210 |
+
uploadContainer.addEventListener('click', () => fileInput.click());
|
| 211 |
+
|
| 212 |
+
uploadContainer.addEventListener('dragover', (e) => {
|
| 213 |
+
e.preventDefault();
|
| 214 |
+
uploadContainer.classList.add('border-[#4bb7a9]', 'bg-gray-100');
|
| 215 |
+
});
|
| 216 |
+
|
| 217 |
+
uploadContainer.addEventListener('dragleave', () => {
|
| 218 |
+
uploadContainer.classList.remove('border-[#4bb7a9]', 'bg-gray-100');
|
| 219 |
+
});
|
| 220 |
+
|
| 221 |
+
uploadContainer.addEventListener('drop', (e) => {
|
| 222 |
+
e.preventDefault();
|
| 223 |
+
uploadContainer.classList.remove('border-[#4bb7a9]', 'bg-gray-100');
|
| 224 |
+
if (e.dataTransfer.files.length) {
|
| 225 |
+
fileInput.files = e.dataTransfer.files;
|
| 226 |
+
handleFileUpload();
|
| 227 |
+
}
|
| 228 |
+
});
|
| 229 |
+
|
| 230 |
+
fileInput.addEventListener('change', handleFileUpload);
|
| 231 |
+
|
| 232 |
+
function handleFileUpload() {
|
| 233 |
+
if (fileInput.files.length) {
|
| 234 |
+
const file = fileInput.files[0];
|
| 235 |
+
const validTypes = ['application/pdf', 'application/msword', 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'];
|
| 236 |
+
|
| 237 |
+
if (!validTypes.includes(file.type) && !file.name.match(/\.(pdf|doc|docx)$/)) {
|
| 238 |
+
alert('Format de fichier non supporté. Veuillez uploader un PDF, DOC ou DOCX.');
|
| 239 |
+
return;
|
| 240 |
+
}
|
| 241 |
+
|
| 242 |
+
if (file.size > 5 * 1024 * 1024) {
|
| 243 |
+
alert('Le fichier est trop volumineux (max 5MB).');
|
| 244 |
+
return;
|
| 245 |
+
}
|
| 246 |
+
|
| 247 |
+
// Show uploading state
|
| 248 |
+
uploadContainer.classList.add('hidden');
|
| 249 |
+
uploadingDiv.classList.remove('hidden');
|
| 250 |
+
|
| 251 |
+
// Simulate API call to Deepseek AI
|
| 252 |
+
setTimeout(() => {
|
| 253 |
+
analyzeCV(file.name);
|
| 254 |
+
}, 2500);
|
| 255 |
+
}
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
function analyzeCV(filename) {
|
| 259 |
+
// Hide uploading and show results
|
| 260 |
+
uploadingDiv.classList.add('hidden');
|
| 261 |
+
resultsSection.classList.remove('hidden');
|
| 262 |
+
aiAnalysisSection.classList.remove('hidden');
|
| 263 |
+
|
| 264 |
+
// Generate random scores for demo purposes
|
| 265 |
+
const contentScore = Math.floor(Math.random() * 30) + 50; // 50-80
|
| 266 |
+
const formScore = Math.floor(Math.random() * 40) + 30; // 30-70
|
| 267 |
+
const clarityScore = Math.floor(Math.random() * 35) + 45; // 45-80
|
| 268 |
+
const relevanceScore = Math.floor(Math.random() * 25) + 60; // 60-85
|
| 269 |
+
|
| 270 |
+
const overallScore = Math.round((contentScore + formScore + clarityScore + relevanceScore) / 4);
|
| 271 |
+
|
| 272 |
+
// Update scores
|
| 273 |
+
updateScore('content', contentScore);
|
| 274 |
+
updateScore('form', formScore);
|
| 275 |
+
updateScore('clarity', clarityScore);
|
| 276 |
+
updateScore('relevance', relevanceScore);
|
| 277 |
+
updateOverallScore(overallScore);
|
| 278 |
+
|
| 279 |
+
// Create chart
|
| 280 |
+
createScoreChart(contentScore, formScore, clarityScore, relevanceScore);
|
| 281 |
+
|
| 282 |
+
// Generate recommendations based on scores
|
| 283 |
+
generateRecommendations(contentScore, formScore, clarityScore, relevanceScore);
|
| 284 |
+
|
| 285 |
+
// Generate AI feedback
|
| 286 |
+
generateAIFeedback(filename, overallScore, contentScore, formScore, clarityScore, relevanceScore);
|
| 287 |
+
}
|
| 288 |
+
|
| 289 |
+
function updateScore(type, score) {
|
| 290 |
+
const scoreElement = document.getElementById(`${type}-score`);
|
| 291 |
+
const fillElement = document.getElementById(`${type}-fill`);
|
| 292 |
+
|
| 293 |
+
scoreElement.textContent = `${score}%`;
|
| 294 |
+
fillElement.style.width = `${score}%`;
|
| 295 |
+
|
| 296 |
+
// Update color based on score
|
| 297 |
+
if (score <= 40) {
|
| 298 |
+
fillElement.classList.remove('bg-yellow-500', 'bg-green-500');
|
| 299 |
+
fillElement.classList.add('bg-red-500');
|
| 300 |
+
} else if (score <= 70) {
|
| 301 |
+
fillElement.classList.remove('bg-red-500', 'bg-green-500');
|
| 302 |
+
fillElement.classList.add('bg-yellow-500');
|
| 303 |
+
} else {
|
| 304 |
+
fillElement.classList.remove('bg-red-500', 'bg-yellow-500');
|
| 305 |
+
fillElement.classList.add('bg-green-500');
|
| 306 |
+
}
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
function updateOverallScore(score) {
|
| 310 |
+
const scoreDisplay = document.getElementById('score-display');
|
| 311 |
+
const percentageElement = scoreDisplay.querySelector('div:first-child');
|
| 312 |
+
|
| 313 |
+
percentageElement.textContent = `${score}%`;
|
| 314 |
+
|
| 315 |
+
// Pulse animation for good scores
|
| 316 |
+
if (score > 70) {
|
| 317 |
+
scoreDisplay.classList.add('pulse');
|
| 318 |
+
} else {
|
| 319 |
+
scoreDisplay.classList.remove('pulse');
|
| 320 |
+
}
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
function createScoreChart(content, form, clarity, relevance) {
|
| 324 |
+
const ctx = document.getElementById('score-chart').getContext('2d');
|
| 325 |
+
|
| 326 |
+
new Chart(ctx, {
|
| 327 |
+
type: 'radar',
|
| 328 |
+
data: {
|
| 329 |
+
labels: ['Contenu', 'Forme', 'Clarté', 'Pertinence'],
|
| 330 |
+
datasets: [{
|
| 331 |
+
label: 'Score',
|
| 332 |
+
data: [content, form, clarity, relevance],
|
| 333 |
+
backgroundColor: 'rgba(75, 183, 169, 0.2)',
|
| 334 |
+
borderColor: '#4bb7a9',
|
| 335 |
+
borderWidth: 2,
|
| 336 |
+
pointBackgroundColor: '#4bb7a9',
|
| 337 |
+
pointRadius: 4
|
| 338 |
+
}]
|
| 339 |
+
},
|
| 340 |
+
options: {
|
| 341 |
+
scales: {
|
| 342 |
+
r: {
|
| 343 |
+
angleLines: {
|
| 344 |
+
display: true,
|
| 345 |
+
color: 'rgba(0, 0, 0, 0.1)'
|
| 346 |
+
},
|
| 347 |
+
suggestedMin: 0,
|
| 348 |
+
suggestedMax: 100,
|
| 349 |
+
ticks: {
|
| 350 |
+
stepSize: 20,
|
| 351 |
+
backdropColor: 'transparent'
|
| 352 |
+
},
|
| 353 |
+
grid: {
|
| 354 |
+
color: 'rgba(0, 0, 0, 0.1)'
|
| 355 |
+
},
|
| 356 |
+
pointLabels: {
|
| 357 |
+
font: {
|
| 358 |
+
size: 12,
|
| 359 |
+
weight: 'bold'
|
| 360 |
+
}
|
| 361 |
+
}
|
| 362 |
+
}
|
| 363 |
+
},
|
| 364 |
+
plugins: {
|
| 365 |
+
legend: {
|
| 366 |
+
display: false
|
| 367 |
+
}
|
| 368 |
+
},
|
| 369 |
+
elements: {
|
| 370 |
+
line: {
|
| 371 |
+
tension: 0.1
|
| 372 |
+
}
|
| 373 |
+
}
|
| 374 |
+
}
|
| 375 |
+
});
|
| 376 |
+
}
|
| 377 |
+
|
| 378 |
+
function generateRecommendations(content, form, clarity, relevance) {
|
| 379 |
+
const recommendationsContainer = document.getElementById('recommendations');
|
| 380 |
+
recommendationsContainer.innerHTML = '';
|
| 381 |
+
|
| 382 |
+
const allRecommendations = [];
|
| 383 |
+
|
| 384 |
+
// Content recommendations
|
| 385 |
+
if (content < 50) {
|
| 386 |
+
allRecommendations.push({
|
| 387 |
+
icon: 'fa-file-alt',
|
| 388 |
+
text: 'Ajoute plus de détails sur tes expériences professionnelles et formations.'
|
| 389 |
+
});
|
| 390 |
+
allRecommendations.push({
|
| 391 |
+
icon: 'fa-tasks',
|
| 392 |
+
text: 'Structure mieux les sections de ton CV (expériences, formations, compétences).'
|
| 393 |
+
});
|
| 394 |
+
} else if (content < 70) {
|
| 395 |
+
allRecommendations.push({
|
| 396 |
+
icon: 'fa-file-alt',
|
| 397 |
+
text: 'Enrichis les descriptions de tes expériences avec des réalisations concrètes.'
|
| 398 |
+
});
|
| 399 |
+
}
|
| 400 |
+
|
| 401 |
+
// Form recommendations
|
| 402 |
+
if (form < 50) {
|
| 403 |
+
allRecommendations.push({
|
| 404 |
+
icon: 'fa-paint-brush',
|
| 405 |
+
text: 'Améliore la mise en page pour une meilleure lisibilité.'
|
| 406 |
+
});
|
| 407 |
+
allRecommendations.push({
|
| 408 |
+
icon: 'fa-font',
|
| 409 |
+
text: 'Utilise une police professionnelle et des tailles cohérentes.'
|
| 410 |
+
});
|
| 411 |
+
} else if (form < 70) {
|
| 412 |
+
allRecommendations.push({
|
| 413 |
+
icon: 'fa-align-left',
|
| 414 |
+
text: 'Soigne davantage l\'alignement et les espacements.'
|
| 415 |
+
});
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
// Clarity recommendations
|
| 419 |
+
if (clarity < 60) {
|
| 420 |
+
allRecommendations.push({
|
| 421 |
+
icon: 'fa-spell-check',
|
| 422 |
+
text: 'Corrige les fautes d\'orthographe et de grammaire.'
|
| 423 |
+
});
|
| 424 |
+
allRecommendations.push({
|
| 425 |
+
icon: 'fa-bullhorn',
|
| 426 |
+
text: 'Utilise un langage plus clair et concis.'
|
| 427 |
+
});
|
| 428 |
+
}
|
| 429 |
+
|
| 430 |
+
// Relevance recommendations
|
| 431 |
+
if (relevance < 60) {
|
| 432 |
+
allRecommendations.push({
|
| 433 |
+
icon: 'fa-bullseye',
|
| 434 |
+
text: 'Adapte ton CV au secteur d\'activité visé.'
|
| 435 |
+
});
|
| 436 |
+
allRecommendations.push({
|
| 437 |
+
icon: 'fa-filter',
|
| 438 |
+
text: 'Mets en avant les expériences les plus pertinentes.'
|
| 439 |
+
});
|
| 440 |
+
} else if (relevance < 80) {
|
| 441 |
+
allRecommendations.push({
|
| 442 |
+
icon: 'fa-star',
|
| 443 |
+
text: 'Mets davantage en valeur tes compétences clés.'
|
| 444 |
+
});
|
| 445 |
+
}
|
| 446 |
+
|
| 447 |
+
// Default recommendations if none generated
|
| 448 |
+
if (allRecommendations.length === 0) {
|
| 449 |
+
allRecommendations.push({
|
| 450 |
+
icon: 'fa-thumbs-up',
|
| 451 |
+
text: 'Ton CV est déjà bien construit! Pense juste à le personnaliser pour chaque candidature.'
|
| 452 |
+
});
|
| 453 |
+
}
|
| 454 |
+
|
| 455 |
+
// Add recommendations to DOM
|
| 456 |
+
allRecommendations.forEach(rec => {
|
| 457 |
+
const recElement = document.createElement('div');
|
| 458 |
+
recElement.className = 'flex items-start';
|
| 459 |
+
recElement.innerHTML = `
|
| 460 |
+
<i class="fas ${rec.icon} text-[#4bb7a9] mt-1 mr-3"></i>
|
| 461 |
+
<span class="text-gray-700">${rec.text}</span>
|
| 462 |
+
`;
|
| 463 |
+
recommendationsContainer.appendChild(recElement);
|
| 464 |
+
});
|
| 465 |
+
}
|
| 466 |
+
|
| 467 |
+
function generateAIFeedback(filename, overallScore, content, form, clarity, relevance) {
|
| 468 |
+
const feedbackElement = document.getElementById('ai-feedback');
|
| 469 |
+
const strengthsList = document.getElementById('strengths');
|
| 470 |
+
const weaknessesList = document.getElementById('weaknesses');
|
| 471 |
+
|
| 472 |
+
// Generate feedback based on scores
|
| 473 |
+
let feedback = '';
|
| 474 |
+
let strengths = [];
|
| 475 |
+
let weaknesses = [];
|
| 476 |
+
|
| 477 |
+
if (overallScore > 70) {
|
| 478 |
+
feedback = `L'analyse de ton CV "${filename}" montre un document globalement bien construit avec un score de ${overallScore}%. `;
|
| 479 |
+
} else if (overallScore > 50) {
|
| 480 |
+
feedback = `Ton CV "${filename}" obtient un score moyen de ${overallScore}% avec plusieurs points à améliorer. `;
|
| 481 |
+
} else {
|
| 482 |
+
feedback = `L'analyse de ton CV "${filename}" révèle un score faible de ${overallScore}% avec des améliorations importantes à apporter. `;
|
| 483 |
+
}
|
| 484 |
+
|
| 485 |
+
// Content feedback
|
| 486 |
+
if (content > 70) {
|
| 487 |
+
strengths.push('Contenu riche et détaillé');
|
| 488 |
+
} else if (content < 50) {
|
| 489 |
+
weaknesses.push('Contenu trop succinct ou incomplet');
|
| 490 |
+
}
|
| 491 |
+
|
| 492 |
+
// Form feedback
|
| 493 |
+
if (form > 70) {
|
| 494 |
+
strengths.push('Mise en page professionnelle');
|
| 495 |
+
} else if (form < 50) {
|
| 496 |
+
weaknesses.push('Problèmes de mise en page');
|
| 497 |
+
}
|
| 498 |
+
|
| 499 |
+
// Clarity feedback
|
| 500 |
+
if (clarity > 70) {
|
| 501 |
+
strengths.push('Expression claire et précise');
|
| 502 |
+
} else if (clarity < 50) {
|
| 503 |
+
weaknesses.push('Problèmes de clarté ou de langue');
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
// Relevance feedback
|
| 507 |
+
if (relevance > 70) {
|
| 508 |
+
strengths.push('Pertinence des informations par rapport au secteur');
|
| 509 |
+
} else if (relevance < 50) {
|
| 510 |
+
weaknesses.push('Manque de pertinence pour le secteur visé');
|
| 511 |
+
}
|
| 512 |
+
|
| 513 |
+
// Default if no strengths/weaknesses detected (shouldn't happen)
|
| 514 |
+
if (strengths.length === 0) strengths.push('Motivation et potentiel');
|
| 515 |
+
if (weaknesses.length === 0) weaknesses.push('Aucun point faible majeur détecté');
|
| 516 |
+
|
| 517 |
+
// Complete feedback
|
| 518 |
+
feedback += `Voici une analyse détaillée avec des pistes concrètes pour optimiser ton CV et maximiser tes chances.`;
|
| 519 |
+
|
| 520 |
+
// Update DOM
|
| 521 |
+
feedbackElement.textContent = feedback;
|
| 522 |
+
|
| 523 |
+
strengthsList.innerHTML = strengths.map(str =>
|
| 524 |
+
`<li class="flex items-start">
|
| 525 |
+
<i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
|
| 526 |
+
<span>${str}</span>
|
| 527 |
+
</li>`
|
| 528 |
+
).join('');
|
| 529 |
+
|
| 530 |
+
weaknessesList.innerHTML = weaknesses.map(weak =>
|
| 531 |
+
`<li class="flex items-start">
|
| 532 |
+
<i class="fas fa-exclamation-circle text-red-500 mt-1 mr-2"></i>
|
| 533 |
+
<span>${weak}</span>
|
| 534 |
+
</li>`
|
| 535 |
+
).join('');
|
| 536 |
+
}
|
| 537 |
+
});
|
| 538 |
+
</script>
|
| 539 |
+
<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=RaphaelC76/ynov-cv" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
| 540 |
+
</html>
|