Spaces:
Running
Running
Add 2 files
Browse files- index.html +219 -44
- prompts.txt +3 -1
index.html
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
<!DOCTYPE html>
|
| 2 |
-
<html lang="
|
| 3 |
<head>
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
@@ -31,6 +31,12 @@
|
|
| 31 |
padding: 0 2px;
|
| 32 |
border-radius: 2px;
|
| 33 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 34 |
</style>
|
| 35 |
</head>
|
| 36 |
<body class="font-sans bg-gray-50 min-h-screen">
|
|
@@ -41,10 +47,10 @@
|
|
| 41 |
<h1 class="text-2xl font-bold">System<span class="text-yellow-300">Correction</span></h1>
|
| 42 |
</div>
|
| 43 |
<div class="flex space-x-4">
|
| 44 |
-
<button class="bg-white text-purple-600 px-4 py-2 rounded-full font-medium hover:bg-purple-100 smooth-transition">
|
| 45 |
<i class="fas fa-user mr-2"></i>Login
|
| 46 |
</button>
|
| 47 |
-
<button class="bg-yellow-400 text-purple-800 px-4 py-2 rounded-full font-medium hover:bg-yellow-300 smooth-transition">
|
| 48 |
<i class="fas fa-rocket mr-2"></i>Get Started
|
| 49 |
</button>
|
| 50 |
</div>
|
|
@@ -58,10 +64,10 @@
|
|
| 58 |
<div class="flex justify-between items-center mb-6">
|
| 59 |
<h2 class="text-xl font-semibold text-gray-800">Input Text for Correction</h2>
|
| 60 |
<div class="flex space-x-2">
|
| 61 |
-
<button class="bg-blue-100 text-blue-600 p-2 rounded-lg hover:bg-blue-200 smooth-transition" title="Clear">
|
| 62 |
<i class="fas fa-trash-alt"></i>
|
| 63 |
</button>
|
| 64 |
-
<button class="bg-green-100 text-green-600 p-2 rounded-lg hover:bg-green-200 smooth-transition" title="Sample Text">
|
| 65 |
<i class="fas fa-lightbulb"></i>
|
| 66 |
</button>
|
| 67 |
</div>
|
|
@@ -72,16 +78,16 @@
|
|
| 72 |
</div>
|
| 73 |
|
| 74 |
<div class="flex flex-wrap gap-3 mb-4">
|
| 75 |
-
<button class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600 smooth-transition flex items-center">
|
| 76 |
<i class="fas fa-magic mr-2"></i> Auto Correct
|
| 77 |
</button>
|
| 78 |
-
<button class="bg-purple-500 text-white px-4 py-2 rounded-lg hover:bg-purple-600 smooth-transition flex items-center">
|
| 79 |
<i class="fas fa-spell-check mr-2"></i> Grammar Check
|
| 80 |
</button>
|
| 81 |
-
<button class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 smooth-transition flex items-center">
|
| 82 |
<i class="fas fa-robot mr-2"></i> AI Enhance
|
| 83 |
</button>
|
| 84 |
-
<button class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-300 smooth-transition flex items-center">
|
| 85 |
<i class="fas fa-language mr-2"></i> Translate
|
| 86 |
</button>
|
| 87 |
</div>
|
|
@@ -145,16 +151,16 @@
|
|
| 145 |
<div class="bg-gray-50 p-4 rounded-lg">
|
| 146 |
<h3 class="font-medium text-gray-800 mb-3">Quick Actions</h3>
|
| 147 |
<div class="grid grid-cols-2 gap-2">
|
| 148 |
-
<button class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 149 |
<i class="fas fa-copy mr-2"></i> Copy
|
| 150 |
</button>
|
| 151 |
-
<button class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 152 |
<i class="fas fa-download mr-2"></i> Export
|
| 153 |
</button>
|
| 154 |
-
<button class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 155 |
<i class="fas fa-history mr-2"></i> History
|
| 156 |
</button>
|
| 157 |
-
<button class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 158 |
<i class="fas fa-cog mr-2"></i> Settings
|
| 159 |
</button>
|
| 160 |
</div>
|
|
@@ -169,7 +175,7 @@
|
|
| 169 |
<h2 class="text-xl font-semibold text-gray-800">Correction Results</h2>
|
| 170 |
<div class="flex items-center space-x-2">
|
| 171 |
<span class="text-sm text-gray-500">Processing time: <span id="processingTime" class="font-medium">0.45s</span></span>
|
| 172 |
-
<button class="bg-gray-100 text-gray-600 p-2 rounded-lg hover:bg-gray-200 smooth-transition">
|
| 173 |
<i class="fas fa-redo"></i>
|
| 174 |
</button>
|
| 175 |
</div>
|
|
@@ -217,10 +223,10 @@
|
|
| 217 |
</div>
|
| 218 |
|
| 219 |
<div class="mt-6 flex justify-end space-x-3">
|
| 220 |
-
<button class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-300 smooth-transition">
|
| 221 |
Discard Changes
|
| 222 |
</button>
|
| 223 |
-
<button class="gradient-bg text-white px-6 py-2 rounded-lg font-medium hover:opacity-90 smooth-transition">
|
| 224 |
Apply Corrections
|
| 225 |
</button>
|
| 226 |
</div>
|
|
@@ -289,8 +295,8 @@
|
|
| 289 |
<h3 class="text-lg font-semibold mb-4">Subscribe</h3>
|
| 290 |
<p class="text-gray-400 mb-4">Stay updated with our latest features and updates.</p>
|
| 291 |
<div class="flex">
|
| 292 |
-
<input type="email" placeholder="Your email" class="px-4 py-2 rounded-l-lg focus:outline-none text-gray-800 w-full">
|
| 293 |
-
<button class="bg-blue-500 text-white px-4 py-2 rounded-r-lg hover:bg-blue-600 smooth-transition">
|
| 294 |
<i class="fas fa-paper-plane"></i>
|
| 295 |
</button>
|
| 296 |
</div>
|
|
@@ -310,6 +316,7 @@
|
|
| 310 |
|
| 311 |
<script>
|
| 312 |
document.addEventListener('DOMContentLoaded', function() {
|
|
|
|
| 313 |
const inputText = document.getElementById('inputText');
|
| 314 |
const processBtn = document.getElementById('processBtn');
|
| 315 |
const resultsSection = document.getElementById('resultsSection');
|
|
@@ -325,7 +332,26 @@
|
|
| 325 |
const processingTime = document.getElementById('processingTime');
|
| 326 |
const correctionsDetails = document.getElementById('correctionsDetails');
|
| 327 |
|
| 328 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 329 |
const sampleSuggestions = [
|
| 330 |
"Consider varying sentence length for better readability",
|
| 331 |
"Potential passive voice detected (3 instances)",
|
|
@@ -334,7 +360,6 @@
|
|
| 334 |
"3 instances of repetitive word usage"
|
| 335 |
];
|
| 336 |
|
| 337 |
-
// Sample corrections data
|
| 338 |
const sampleCorrections = [
|
| 339 |
{
|
| 340 |
type: "Grammar",
|
|
@@ -363,7 +388,125 @@
|
|
| 363 |
];
|
| 364 |
|
| 365 |
// Update character count in real-time
|
| 366 |
-
inputText.addEventListener('input',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 367 |
const text = inputText.value;
|
| 368 |
const count = text.length;
|
| 369 |
charCount.textContent = count;
|
|
@@ -402,10 +545,21 @@
|
|
| 402 |
</li>
|
| 403 |
`;
|
| 404 |
}
|
| 405 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 406 |
|
| 407 |
-
|
| 408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 409 |
const text = inputText.value.trim();
|
| 410 |
|
| 411 |
if (text.length === 0) {
|
|
@@ -462,29 +616,50 @@
|
|
| 462 |
// Scroll to results
|
| 463 |
resultsSection.scrollIntoView({ behavior: 'smooth' });
|
| 464 |
}, 1500);
|
| 465 |
-
}
|
| 466 |
|
| 467 |
-
|
| 468 |
-
|
| 469 |
-
|
| 470 |
-
|
| 471 |
-
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 476 |
|
| 477 |
-
|
| 478 |
-
|
| 479 |
-
|
|
|
|
| 480 |
|
| 481 |
-
|
| 482 |
-
|
| 483 |
-
|
| 484 |
-
|
| 485 |
-
|
| 486 |
-
|
| 487 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 488 |
});
|
| 489 |
</script>
|
| 490 |
<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=docto41/system-correction" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
|
|
|
| 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">
|
|
|
|
| 31 |
padding: 0 2px;
|
| 32 |
border-radius: 2px;
|
| 33 |
}
|
| 34 |
+
.blink {
|
| 35 |
+
animation: blink 1s step-start infinite;
|
| 36 |
+
}
|
| 37 |
+
@keyframes blink {
|
| 38 |
+
50% { opacity: 0; }
|
| 39 |
+
}
|
| 40 |
</style>
|
| 41 |
</head>
|
| 42 |
<body class="font-sans bg-gray-50 min-h-screen">
|
|
|
|
| 47 |
<h1 class="text-2xl font-bold">System<span class="text-yellow-300">Correction</span></h1>
|
| 48 |
</div>
|
| 49 |
<div class="flex space-x-4">
|
| 50 |
+
<button id="loginBtn" class="bg-white text-purple-600 px-4 py-2 rounded-full font-medium hover:bg-purple-100 smooth-transition">
|
| 51 |
<i class="fas fa-user mr-2"></i>Login
|
| 52 |
</button>
|
| 53 |
+
<button id="getStartedBtn" class="bg-yellow-400 text-purple-800 px-4 py-2 rounded-full font-medium hover:bg-yellow-300 smooth-transition">
|
| 54 |
<i class="fas fa-rocket mr-2"></i>Get Started
|
| 55 |
</button>
|
| 56 |
</div>
|
|
|
|
| 64 |
<div class="flex justify-between items-center mb-6">
|
| 65 |
<h2 class="text-xl font-semibold text-gray-800">Input Text for Correction</h2>
|
| 66 |
<div class="flex space-x-2">
|
| 67 |
+
<button id="clearBtn" class="bg-blue-100 text-blue-600 p-2 rounded-lg hover:bg-blue-200 smooth-transition" title="Clear">
|
| 68 |
<i class="fas fa-trash-alt"></i>
|
| 69 |
</button>
|
| 70 |
+
<button id="sampleTextBtn" class="bg-green-100 text-green-600 p-2 rounded-lg hover:bg-green-200 smooth-transition" title="Sample Text">
|
| 71 |
<i class="fas fa-lightbulb"></i>
|
| 72 |
</button>
|
| 73 |
</div>
|
|
|
|
| 78 |
</div>
|
| 79 |
|
| 80 |
<div class="flex flex-wrap gap-3 mb-4">
|
| 81 |
+
<button id="autoCorrectBtn" class="bg-blue-500 text-white px-4 py-2 rounded-lg hover:bg-blue-600 smooth-transition flex items-center">
|
| 82 |
<i class="fas fa-magic mr-2"></i> Auto Correct
|
| 83 |
</button>
|
| 84 |
+
<button id="grammarCheckBtn" class="bg-purple-500 text-white px-4 py-2 rounded-lg hover:bg-purple-600 smooth-transition flex items-center">
|
| 85 |
<i class="fas fa-spell-check mr-2"></i> Grammar Check
|
| 86 |
</button>
|
| 87 |
+
<button id="aiEnhanceBtn" class="bg-green-500 text-white px-4 py-2 rounded-lg hover:bg-green-600 smooth-transition flex items-center">
|
| 88 |
<i class="fas fa-robot mr-2"></i> AI Enhance
|
| 89 |
</button>
|
| 90 |
+
<button id="translateBtn" class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-300 smooth-transition flex items-center">
|
| 91 |
<i class="fas fa-language mr-2"></i> Translate
|
| 92 |
</button>
|
| 93 |
</div>
|
|
|
|
| 151 |
<div class="bg-gray-50 p-4 rounded-lg">
|
| 152 |
<h3 class="font-medium text-gray-800 mb-3">Quick Actions</h3>
|
| 153 |
<div class="grid grid-cols-2 gap-2">
|
| 154 |
+
<button id="copyBtn" class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 155 |
<i class="fas fa-copy mr-2"></i> Copy
|
| 156 |
</button>
|
| 157 |
+
<button id="exportBtn" class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 158 |
<i class="fas fa-download mr-2"></i> Export
|
| 159 |
</button>
|
| 160 |
+
<button id="historyBtn" class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 161 |
<i class="fas fa-history mr-2"></i> History
|
| 162 |
</button>
|
| 163 |
+
<button id="settingsBtn" class="bg-white border border-gray-200 text-gray-700 px-3 py-2 rounded-lg text-sm hover:bg-gray-100 smooth-transition flex items-center justify-center">
|
| 164 |
<i class="fas fa-cog mr-2"></i> Settings
|
| 165 |
</button>
|
| 166 |
</div>
|
|
|
|
| 175 |
<h2 class="text-xl font-semibold text-gray-800">Correction Results</h2>
|
| 176 |
<div class="flex items-center space-x-2">
|
| 177 |
<span class="text-sm text-gray-500">Processing time: <span id="processingTime" class="font-medium">0.45s</span></span>
|
| 178 |
+
<button id="refreshBtn" class="bg-gray-100 text-gray-600 p-2 rounded-lg hover:bg-gray-200 smooth-transition">
|
| 179 |
<i class="fas fa-redo"></i>
|
| 180 |
</button>
|
| 181 |
</div>
|
|
|
|
| 223 |
</div>
|
| 224 |
|
| 225 |
<div class="mt-6 flex justify-end space-x-3">
|
| 226 |
+
<button id="discardBtn" class="bg-gray-200 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-300 smooth-transition">
|
| 227 |
Discard Changes
|
| 228 |
</button>
|
| 229 |
+
<button id="applyCorrectionsBtn" class="gradient-bg text-white px-6 py-2 rounded-lg font-medium hover:opacity-90 smooth-transition">
|
| 230 |
Apply Corrections
|
| 231 |
</button>
|
| 232 |
</div>
|
|
|
|
| 295 |
<h3 class="text-lg font-semibold mb-4">Subscribe</h3>
|
| 296 |
<p class="text-gray-400 mb-4">Stay updated with our latest features and updates.</p>
|
| 297 |
<div class="flex">
|
| 298 |
+
<input id="subscribeEmail" type="email" placeholder="Your email" class="px-4 py-2 rounded-l-lg focus:outline-none text-gray-800 w-full">
|
| 299 |
+
<button id="subscribeBtn" class="bg-blue-500 text-white px-4 py-2 rounded-r-lg hover:bg-blue-600 smooth-transition">
|
| 300 |
<i class="fas fa-paper-plane"></i>
|
| 301 |
</button>
|
| 302 |
</div>
|
|
|
|
| 316 |
|
| 317 |
<script>
|
| 318 |
document.addEventListener('DOMContentLoaded', function() {
|
| 319 |
+
// Elements
|
| 320 |
const inputText = document.getElementById('inputText');
|
| 321 |
const processBtn = document.getElementById('processBtn');
|
| 322 |
const resultsSection = document.getElementById('resultsSection');
|
|
|
|
| 332 |
const processingTime = document.getElementById('processingTime');
|
| 333 |
const correctionsDetails = document.getElementById('correctionsDetails');
|
| 334 |
|
| 335 |
+
// Buttons
|
| 336 |
+
const loginBtn = document.getElementById('loginBtn');
|
| 337 |
+
const getStartedBtn = document.getElementById('getStartedBtn');
|
| 338 |
+
const clearBtn = document.getElementById('clearBtn');
|
| 339 |
+
const sampleTextBtn = document.getElementById('sampleTextBtn');
|
| 340 |
+
const autoCorrectBtn = document.getElementById('autoCorrectBtn');
|
| 341 |
+
const grammarCheckBtn = document.getElementById('grammarCheckBtn');
|
| 342 |
+
const aiEnhanceBtn = document.getElementById('aiEnhanceBtn');
|
| 343 |
+
const translateBtn = document.getElementById('translateBtn');
|
| 344 |
+
const copyBtn = document.getElementById('copyBtn');
|
| 345 |
+
const exportBtn = document.getElementById('exportBtn');
|
| 346 |
+
const historyBtn = document.getElementById('historyBtn');
|
| 347 |
+
const settingsBtn = document.getElementById('settingsBtn');
|
| 348 |
+
const refreshBtn = document.getElementById('refreshBtn');
|
| 349 |
+
const discardBtn = document.getElementById('discardBtn');
|
| 350 |
+
const applyCorrectionsBtn = document.getElementById('applyCorrectionsBtn');
|
| 351 |
+
const subscribeBtn = document.getElementById('subscribeBtn');
|
| 352 |
+
const subscribeEmail = document.getElementById('subscribeEmail');
|
| 353 |
+
|
| 354 |
+
// Sample data
|
| 355 |
const sampleSuggestions = [
|
| 356 |
"Consider varying sentence length for better readability",
|
| 357 |
"Potential passive voice detected (3 instances)",
|
|
|
|
| 360 |
"3 instances of repetitive word usage"
|
| 361 |
];
|
| 362 |
|
|
|
|
| 363 |
const sampleCorrections = [
|
| 364 |
{
|
| 365 |
type: "Grammar",
|
|
|
|
| 388 |
];
|
| 389 |
|
| 390 |
// Update character count in real-time
|
| 391 |
+
inputText.addEventListener('input', updateTextStats);
|
| 392 |
+
|
| 393 |
+
// Button event listeners
|
| 394 |
+
loginBtn.addEventListener('click', () => {
|
| 395 |
+
alert('Login functionality would be implemented here');
|
| 396 |
+
});
|
| 397 |
+
|
| 398 |
+
getStartedBtn.addEventListener('click', () => {
|
| 399 |
+
alert('Get Started - Redirect to documentation or tutorial');
|
| 400 |
+
});
|
| 401 |
+
|
| 402 |
+
clearBtn.addEventListener('click', clearInput);
|
| 403 |
+
|
| 404 |
+
sampleTextBtn.addEventListener('click', insertSampleText);
|
| 405 |
+
|
| 406 |
+
autoCorrectBtn.addEventListener('click', () => {
|
| 407 |
+
if (inputText.value.trim()) {
|
| 408 |
+
alert('Auto Correct feature would be implemented here');
|
| 409 |
+
// For demo purposes, we'll just process the text
|
| 410 |
+
processText();
|
| 411 |
+
} else {
|
| 412 |
+
alert('Please enter some text first');
|
| 413 |
+
}
|
| 414 |
+
});
|
| 415 |
+
|
| 416 |
+
grammarCheckBtn.addEventListener('click', () => {
|
| 417 |
+
if (inputText.value.trim()) {
|
| 418 |
+
alert('Grammar Check feature would be implemented here');
|
| 419 |
+
// For demo purposes, we'll just process the text
|
| 420 |
+
processText();
|
| 421 |
+
} else {
|
| 422 |
+
alert('Please enter some text first');
|
| 423 |
+
}
|
| 424 |
+
});
|
| 425 |
+
|
| 426 |
+
aiEnhanceBtn.addEventListener('click', () => {
|
| 427 |
+
if (inputText.value.trim()) {
|
| 428 |
+
alert('AI Enhance feature would be implemented here');
|
| 429 |
+
// For demo purposes, we'll just process the text
|
| 430 |
+
processText();
|
| 431 |
+
} else {
|
| 432 |
+
alert('Please enter some text first');
|
| 433 |
+
}
|
| 434 |
+
});
|
| 435 |
+
|
| 436 |
+
translateBtn.addEventListener('click', () => {
|
| 437 |
+
if (inputText.value.trim()) {
|
| 438 |
+
alert('Translate feature would be implemented here');
|
| 439 |
+
// For demo purposes, we'll just process the text
|
| 440 |
+
processText();
|
| 441 |
+
} else {
|
| 442 |
+
alert('Please enter some text first');
|
| 443 |
+
}
|
| 444 |
+
});
|
| 445 |
+
|
| 446 |
+
copyBtn.addEventListener('click', copyText);
|
| 447 |
+
|
| 448 |
+
exportBtn.addEventListener('click', () => {
|
| 449 |
+
if (inputText.value.trim()) {
|
| 450 |
+
alert('Export feature would be implemented here');
|
| 451 |
+
// For demo purposes, we'll create a download link
|
| 452 |
+
const text = inputText.value;
|
| 453 |
+
const blob = new Blob([text], {type: 'text/plain'});
|
| 454 |
+
const url = URL.createObjectURL(blob);
|
| 455 |
+
const a = document.createElement('a');
|
| 456 |
+
a.href = url;
|
| 457 |
+
a.download = 'corrected-text.txt';
|
| 458 |
+
document.body.appendChild(a);
|
| 459 |
+
a.click();
|
| 460 |
+
document.body.removeChild(a);
|
| 461 |
+
URL.revokeObjectURL(url);
|
| 462 |
+
} else {
|
| 463 |
+
alert('No text to export');
|
| 464 |
+
}
|
| 465 |
+
});
|
| 466 |
+
|
| 467 |
+
historyBtn.addEventListener('click', () => {
|
| 468 |
+
alert('History feature would be implemented here');
|
| 469 |
+
});
|
| 470 |
+
|
| 471 |
+
settingsBtn.addEventListener('click', () => {
|
| 472 |
+
alert('Settings panel would be shown here');
|
| 473 |
+
});
|
| 474 |
+
|
| 475 |
+
processBtn.addEventListener('click', processText);
|
| 476 |
+
|
| 477 |
+
refreshBtn.addEventListener('click', () => {
|
| 478 |
+
if (inputText.value.trim()) {
|
| 479 |
+
processText();
|
| 480 |
+
} else {
|
| 481 |
+
alert('Please enter some text to process');
|
| 482 |
+
}
|
| 483 |
+
});
|
| 484 |
+
|
| 485 |
+
discardBtn.addEventListener('click', () => {
|
| 486 |
+
resultsSection.classList.add('hidden');
|
| 487 |
+
inputText.focus();
|
| 488 |
+
});
|
| 489 |
+
|
| 490 |
+
applyCorrectionsBtn.addEventListener('click', () => {
|
| 491 |
+
if (correctedText.textContent) {
|
| 492 |
+
inputText.value = correctedText.textContent;
|
| 493 |
+
updateTextStats();
|
| 494 |
+
alert('Corrections applied to input text!');
|
| 495 |
+
}
|
| 496 |
+
});
|
| 497 |
+
|
| 498 |
+
subscribeBtn.addEventListener('click', () => {
|
| 499 |
+
const email = subscribeEmail.value.trim();
|
| 500 |
+
if (email && validateEmail(email)) {
|
| 501 |
+
subscribeEmail.value = '';
|
| 502 |
+
alert(`Thank you for subscribing with ${email}!`);
|
| 503 |
+
} else {
|
| 504 |
+
alert('Please enter a valid email address');
|
| 505 |
+
}
|
| 506 |
+
});
|
| 507 |
+
|
| 508 |
+
// Functions
|
| 509 |
+
function updateTextStats() {
|
| 510 |
const text = inputText.value;
|
| 511 |
const count = text.length;
|
| 512 |
charCount.textContent = count;
|
|
|
|
| 545 |
</li>
|
| 546 |
`;
|
| 547 |
}
|
| 548 |
+
}
|
| 549 |
+
|
| 550 |
+
function clearInput() {
|
| 551 |
+
inputText.value = '';
|
| 552 |
+
updateTextStats();
|
| 553 |
+
resultsSection.classList.add('hidden');
|
| 554 |
+
}
|
| 555 |
|
| 556 |
+
function insertSampleText() {
|
| 557 |
+
const sampleText = `The quick brown fox jumps over the lazy dog. However we must consider that recieve is often misspelled. You was probably not aware of this common mistake. There is a lot of examples that could be used to demonstrate the power of this system.`;
|
| 558 |
+
inputText.value = sampleText;
|
| 559 |
+
updateTextStats();
|
| 560 |
+
}
|
| 561 |
+
|
| 562 |
+
function processText() {
|
| 563 |
const text = inputText.value.trim();
|
| 564 |
|
| 565 |
if (text.length === 0) {
|
|
|
|
| 616 |
// Scroll to results
|
| 617 |
resultsSection.scrollIntoView({ behavior: 'smooth' });
|
| 618 |
}, 1500);
|
| 619 |
+
}
|
| 620 |
|
| 621 |
+
function copyText() {
|
| 622 |
+
if (resultsSection.classList.contains('hidden')) {
|
| 623 |
+
// Copy input text if results aren't shown
|
| 624 |
+
if (inputText.value.trim()) {
|
| 625 |
+
inputText.select();
|
| 626 |
+
document.execCommand('copy');
|
| 627 |
+
showCopyFeedback(inputText);
|
| 628 |
+
} else {
|
| 629 |
+
alert('No text to copy');
|
| 630 |
+
}
|
| 631 |
+
} else {
|
| 632 |
+
// Copy corrected text if results are shown
|
| 633 |
+
if (correctedText.textContent.trim()) {
|
| 634 |
+
const range = document.createRange();
|
| 635 |
+
range.selectNode(correctedText);
|
| 636 |
+
window.getSelection().removeAllRanges();
|
| 637 |
+
window.getSelection().addRange(range);
|
| 638 |
+
document.execCommand('copy');
|
| 639 |
+
window.getSelection().removeAllRanges();
|
| 640 |
+
showCopyFeedback(correctedText);
|
| 641 |
+
}
|
| 642 |
+
}
|
| 643 |
+
}
|
| 644 |
|
| 645 |
+
function showCopyFeedback(element) {
|
| 646 |
+
const originalText = element.textContent;
|
| 647 |
+
element.textContent = 'Copied to clipboard!';
|
| 648 |
+
element.classList.add('blink');
|
| 649 |
|
| 650 |
+
setTimeout(() => {
|
| 651 |
+
element.textContent = originalText;
|
| 652 |
+
element.classList.remove('blink');
|
| 653 |
+
}, 1000);
|
| 654 |
+
}
|
| 655 |
+
|
| 656 |
+
function validateEmail(email) {
|
| 657 |
+
const re = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
| 658 |
+
return re.test(email);
|
| 659 |
+
}
|
| 660 |
+
|
| 661 |
+
// Initialize
|
| 662 |
+
updateTextStats();
|
| 663 |
});
|
| 664 |
</script>
|
| 665 |
<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=docto41/system-correction" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
|
prompts.txt
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
https://huggingface.co/spaces/doctorblo/systeme-correction
|
|
|
|
|
|
|
|
|
| 1 |
+
https://huggingface.co/spaces/doctorblo/systeme-correction
|
| 2 |
+
aucun bouton fonctionne veuillez verifier toutes les bouton et mettre a jours
|
| 3 |
+
aucun bouton fonctionne veuillez corriger les erreurs de non fonctionnement
|