docto41 commited on
Commit
57ec99d
·
verified ·
1 Parent(s): 9544f9f

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +491 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: System Correction
3
- emoji: 👀
4
- colorFrom: purple
5
- colorTo: red
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: system-correction
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: blue
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,491 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>System Correction Interface</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
+ .gradient-bg {
11
+ background: linear-gradient(135deg, #6e8efb, #a777e3);
12
+ }
13
+ .text-gradient {
14
+ background: linear-gradient(90deg, #4facfe 0%, #00f2fe 100%);
15
+ -webkit-background-clip: text;
16
+ background-clip: text;
17
+ color: transparent;
18
+ }
19
+ .shadow-soft {
20
+ box-shadow: 0 10px 20px rgba(0,0,0,0.1);
21
+ }
22
+ .card-hover:hover {
23
+ transform: translateY(-5px);
24
+ transition: all 0.3s ease;
25
+ }
26
+ .smooth-transition {
27
+ transition: all 0.3s ease;
28
+ }
29
+ .highlight {
30
+ background-color: rgba(255, 255, 0, 0.3);
31
+ padding: 0 2px;
32
+ border-radius: 2px;
33
+ }
34
+ </style>
35
+ </head>
36
+ <body class="font-sans bg-gray-50 min-h-screen">
37
+ <div class="gradient-bg text-white py-6 px-4 shadow-lg">
38
+ <div class="container mx-auto flex justify-between items-center">
39
+ <div class="flex items-center space-x-3">
40
+ <i class="fas fa-cogs text-3xl"></i>
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>
51
+ </div>
52
+ </div>
53
+
54
+ <div class="container mx-auto px-4 py-8">
55
+ <div class="grid grid-cols-1 lg:grid-cols-3 gap-8">
56
+ <!-- Input Section -->
57
+ <div class="lg:col-span-2 bg-white rounded-xl shadow-soft p-6">
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>
68
+ </div>
69
+
70
+ <div class="mb-4">
71
+ <textarea id="inputText" class="w-full h-64 p-4 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-blue-500 resize-none" placeholder="Enter your text here for system correction..."></textarea>
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>
88
+
89
+ <div class="flex items-center justify-between">
90
+ <div class="flex items-center space-x-2 text-sm text-gray-500">
91
+ <i class="fas fa-info-circle"></i>
92
+ <span>System will analyze your text for errors and improvements</span>
93
+ </div>
94
+ <button id="processBtn" class="gradient-bg text-white px-6 py-3 rounded-lg font-medium hover:opacity-90 smooth-transition flex items-center">
95
+ <i class="fas fa-play mr-2"></i> Process Text
96
+ </button>
97
+ </div>
98
+ </div>
99
+
100
+ <!-- Stats & Info Section -->
101
+ <div class="bg-white rounded-xl shadow-soft p-6">
102
+ <h2 class="text-xl font-semibold text-gray-800 mb-6">Correction Statistics</h2>
103
+
104
+ <div class="space-y-6">
105
+ <div class="bg-blue-50 p-4 rounded-lg">
106
+ <div class="flex justify-between items-center mb-2">
107
+ <span class="text-sm font-medium text-blue-800">Text Length</span>
108
+ <span id="charCount" class="text-lg font-bold text-blue-600">0</span>
109
+ </div>
110
+ <div class="w-full bg-blue-200 rounded-full h-2">
111
+ <div id="charProgress" class="bg-blue-600 h-2 rounded-full" style="width: 0%"></div>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="bg-purple-50 p-4 rounded-lg">
116
+ <div class="flex justify-between items-center mb-2">
117
+ <span class="text-sm font-medium text-purple-800">Estimated Errors</span>
118
+ <span id="errorCount" class="text-lg font-bold text-purple-600">0</span>
119
+ </div>
120
+ <div class="w-full bg-purple-200 rounded-full h-2">
121
+ <div id="errorProgress" class="bg-purple-600 h-2 rounded-full" style="width: 0%"></div>
122
+ </div>
123
+ </div>
124
+
125
+ <div class="bg-green-50 p-4 rounded-lg">
126
+ <div class="flex justify-between items-center mb-2">
127
+ <span class="text-sm font-medium text-green-800">Confidence Level</span>
128
+ <span id="confidenceLevel" class="text-lg font-bold text-green-600">0%</span>
129
+ </div>
130
+ <div class="w-full bg-green-200 rounded-full h-2">
131
+ <div id="confidenceProgress" class="bg-green-600 h-2 rounded-full" style="width: 0%"></div>
132
+ </div>
133
+ </div>
134
+
135
+ <div class="bg-yellow-50 p-4 rounded-lg">
136
+ <h3 class="font-medium text-yellow-800 mb-3">Suggested Improvements</h3>
137
+ <ul id="suggestionsList" class="space-y-2 text-sm text-gray-700">
138
+ <li class="flex items-start">
139
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
140
+ <span>No suggestions yet. Process your text to see recommendations.</span>
141
+ </li>
142
+ </ul>
143
+ </div>
144
+
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>
161
+ </div>
162
+ </div>
163
+ </div>
164
+ </div>
165
+
166
+ <!-- Results Section (Initially Hidden) -->
167
+ <div id="resultsSection" class="hidden mt-8 bg-white rounded-xl shadow-soft p-6">
168
+ <div class="flex justify-between items-center mb-6">
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>
176
+ </div>
177
+
178
+ <div class="grid grid-cols-1 lg:grid-cols-2 gap-6">
179
+ <!-- Original Text -->
180
+ <div class="border border-gray-200 rounded-lg p-4">
181
+ <div class="flex justify-between items-center mb-3">
182
+ <h3 class="font-medium text-gray-700">Original Text</h3>
183
+ <span class="text-xs bg-gray-100 text-gray-600 px-2 py-1 rounded">Unedited</span>
184
+ </div>
185
+ <div id="originalText" class="text-gray-700 p-3 bg-gray-50 rounded h-64 overflow-y-auto">
186
+ <!-- Original text will appear here -->
187
+ </div>
188
+ </div>
189
+
190
+ <!-- Corrected Text -->
191
+ <div class="border border-blue-200 rounded-lg p-4">
192
+ <div class="flex justify-between items-center mb-3">
193
+ <h3 class="font-medium text-blue-700">Corrected Text</h3>
194
+ <span class="text-xs bg-blue-100 text-blue-600 px-2 py-1 rounded">Improved</span>
195
+ </div>
196
+ <div id="correctedText" class="text-gray-800 p-3 bg-blue-50 rounded h-64 overflow-y-auto">
197
+ <!-- Corrected text will appear here -->
198
+ </div>
199
+ </div>
200
+ </div>
201
+
202
+ <!-- Corrections Details -->
203
+ <div class="mt-6 border-t pt-6">
204
+ <h3 class="font-medium text-gray-800 mb-4">Detailed Corrections</h3>
205
+ <div id="correctionsDetails" class="space-y-4">
206
+ <!-- Correction details will appear here -->
207
+ <div class="correction-item hidden p-3 bg-gray-50 rounded-lg border-l-4 border-blue-500">
208
+ <div class="flex justify-between items-start">
209
+ <div>
210
+ <h4 class="font-medium text-gray-800">Grammar Correction</h4>
211
+ <p class="text-sm text-gray-600">Changed from "<span class="original-word font-medium">you was</span>" to "<span class="corrected-word font-medium text-green-600">you were</span>"</p>
212
+ </div>
213
+ <span class="text-xs bg-blue-100 text-blue-600 px-2 py-1 rounded">Grammar</span>
214
+ </div>
215
+ </div>
216
+ </div>
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>
227
+ </div>
228
+
229
+ <!-- Features Section -->
230
+ <div class="mt-16">
231
+ <h2 class="text-2xl font-bold text-center text-gray-800 mb-2">Advanced Correction Features</h2>
232
+ <p class="text-center text-gray-600 max-w-2xl mx-auto mb-12">Our system utilizes cutting-edge technology to provide comprehensive text analysis and improvement suggestions.</p>
233
+
234
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
235
+ <div class="bg-white p-6 rounded-xl shadow-soft card-hover">
236
+ <div class="text-blue-500 text-4xl mb-4">
237
+ <i class="fas fa-robot"></i>
238
+ </div>
239
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">AI-Powered Analysis</h3>
240
+ <p class="text-gray-600">Our advanced algorithms detect subtle errors and provide context-aware corrections that go beyond basic spell checking.</p>
241
+ </div>
242
+
243
+ <div class="bg-white p-6 rounded-xl shadow-soft card-hover">
244
+ <div class="text-purple-500 text-4xl mb-4">
245
+ <i class="fas fa-chart-line"></i>
246
+ </div>
247
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Style Enhancement</h3>
248
+ <p class="text-gray-600">Improve readability and engagement with suggestions for sentence structure, word choice, and overall flow.</p>
249
+ </div>
250
+
251
+ <div class="bg-white p-6 rounded-xl shadow-soft card-hover">
252
+ <div class="text-green-500 text-4xl mb-4">
253
+ <i class="fas fa-shield-alt"></i>
254
+ </div>
255
+ <h3 class="text-lg font-semibold text-gray-800 mb-2">Plagiarism Check</h3>
256
+ <p class="text-gray-600">Optional integration with plagiarism detection to ensure your content is original and properly cited.</p>
257
+ </div>
258
+ </div>
259
+ </div>
260
+ </div>
261
+
262
+ <!-- Footer -->
263
+ <footer class="bg-gray-800 text-white py-8 mt-16">
264
+ <div class="container mx-auto px-4">
265
+ <div class="grid grid-cols-1 md:grid-cols-4 gap-8">
266
+ <div>
267
+ <h3 class="text-lg font-semibold mb-4">SystemCorrection</h3>
268
+ <p class="text-gray-400">Advanced text analysis and correction system powered by AI and natural language processing.</p>
269
+ </div>
270
+ <div>
271
+ <h3 class="text-lg font-semibold mb-4">Features</h3>
272
+ <ul class="space-y-2 text-gray-400">
273
+ <li><a href="#" class="hover:text-white smooth-transition">Grammar Check</a></li>
274
+ <li><a href="#" class="hover:text-white smooth-transition">Style Improvement</a></li>
275
+ <li><a href="#" class="hover:text-white smooth-transition">Plagiarism Detection</a></li>
276
+ <li><a href="#" class="hover:text-white smooth-transition">Translation</a></li>
277
+ </ul>
278
+ </div>
279
+ <div>
280
+ <h3 class="text-lg font-semibold mb-4">Resources</h3>
281
+ <ul class="space-y-2 text-gray-400">
282
+ <li><a href="#" class="hover:text-white smooth-transition">Documentation</a></li>
283
+ <li><a href="#" class="hover:text-white smooth-transition">API Access</a></li>
284
+ <li><a href="#" class="hover:text-white smooth-transition">Blog</a></li>
285
+ <li><a href="#" class="hover:text-white smooth-transition">Support</a></li>
286
+ </ul>
287
+ </div>
288
+ <div>
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>
297
+ </div>
298
+ </div>
299
+ <div class="border-t border-gray-700 mt-8 pt-6 flex flex-col md:flex-row justify-between items-center">
300
+ <p class="text-gray-400">© 2023 SystemCorrection. All rights reserved.</p>
301
+ <div class="flex space-x-4 mt-4 md:mt-0">
302
+ <a href="#" class="text-gray-400 hover:text-white smooth-transition"><i class="fab fa-twitter"></i></a>
303
+ <a href="#" class="text-gray-400 hover:text-white smooth-transition"><i class="fab fa-linkedin"></i></a>
304
+ <a href="#" class="text-gray-400 hover:text-white smooth-transition"><i class="fab fa-github"></i></a>
305
+ <a href="#" class="text-gray-400 hover:text-white smooth-transition"><i class="fab fa-medium"></i></a>
306
+ </div>
307
+ </div>
308
+ </div>
309
+ </footer>
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');
316
+ const originalText = document.getElementById('originalText');
317
+ const correctedText = document.getElementById('correctedText');
318
+ const charCount = document.getElementById('charCount');
319
+ const charProgress = document.getElementById('charProgress');
320
+ const errorCount = document.getElementById('errorCount');
321
+ const errorProgress = document.getElementById('errorProgress');
322
+ const confidenceLevel = document.getElementById('confidenceLevel');
323
+ const confidenceProgress = document.getElementById('confidenceProgress');
324
+ const suggestionsList = document.getElementById('suggestionsList');
325
+ const processingTime = document.getElementById('processingTime');
326
+ const correctionsDetails = document.getElementById('correctionsDetails');
327
+
328
+ // Sample suggestions data
329
+ const sampleSuggestions = [
330
+ "Consider varying sentence length for better readability",
331
+ "Potential passive voice detected (3 instances)",
332
+ "Possible wordiness in paragraph 2",
333
+ "2 complex sentences could be simplified",
334
+ "3 instances of repetitive word usage"
335
+ ];
336
+
337
+ // Sample corrections data
338
+ const sampleCorrections = [
339
+ {
340
+ type: "Grammar",
341
+ original: "you was",
342
+ corrected: "you were",
343
+ description: "Subject-verb agreement error"
344
+ },
345
+ {
346
+ type: "Spelling",
347
+ original: "recieve",
348
+ corrected: "receive",
349
+ description: "Common spelling mistake (i before e)"
350
+ },
351
+ {
352
+ type: "Punctuation",
353
+ original: "However we",
354
+ corrected: "However, we",
355
+ description: "Missing comma after introductory word"
356
+ },
357
+ {
358
+ type: "Style",
359
+ original: "a lot of",
360
+ corrected: "many",
361
+ description: "More concise alternative available"
362
+ }
363
+ ];
364
+
365
+ // Update character count in real-time
366
+ inputText.addEventListener('input', function() {
367
+ const text = inputText.value;
368
+ const count = text.length;
369
+ charCount.textContent = count;
370
+
371
+ // Update progress bar (max 1000 chars for full width)
372
+ const progress = Math.min((count / 1000) * 100, 100);
373
+ charProgress.style.width = `${progress}%`;
374
+
375
+ // Estimate errors (just for demo)
376
+ const estimatedErrors = Math.min(Math.floor(count / 20), 20);
377
+ errorCount.textContent = estimatedErrors;
378
+ errorProgress.style.width = `${(estimatedErrors / 20) * 100}%`;
379
+
380
+ // Random confidence for demo
381
+ const randomConfidence = 70 + Math.floor(Math.random() * 30);
382
+ confidenceLevel.textContent = `${randomConfidence}%`;
383
+ confidenceProgress.style.width = `${randomConfidence}%`;
384
+
385
+ // Update suggestions if text is long enough
386
+ if (count > 30) {
387
+ suggestionsList.innerHTML = '';
388
+ sampleSuggestions.forEach(suggestion => {
389
+ const li = document.createElement('li');
390
+ li.className = 'flex items-start';
391
+ li.innerHTML = `
392
+ <i class="fas fa-lightbulb text-yellow-500 mt-1 mr-2"></i>
393
+ <span>${suggestion}</span>
394
+ `;
395
+ suggestionsList.appendChild(li);
396
+ });
397
+ } else {
398
+ suggestionsList.innerHTML = `
399
+ <li class="flex items-start">
400
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
401
+ <span>No suggestions yet. Add more text to see recommendations.</span>
402
+ </li>
403
+ `;
404
+ }
405
+ });
406
+
407
+ // Process button click handler
408
+ processBtn.addEventListener('click', function() {
409
+ const text = inputText.value.trim();
410
+
411
+ if (text.length === 0) {
412
+ alert('Please enter some text to process');
413
+ return;
414
+ }
415
+
416
+ // Show loading state
417
+ processBtn.innerHTML = '<i class="fas fa-spinner fa-spin mr-2"></i> Processing...';
418
+ processBtn.disabled = true;
419
+
420
+ // Simulate processing delay
421
+ setTimeout(() => {
422
+ // Display results
423
+ originalText.textContent = text;
424
+
425
+ // Create corrected version with some sample corrections
426
+ let correctedVersion = text;
427
+
428
+ // Apply sample corrections
429
+ sampleCorrections.forEach(correction => {
430
+ correctedVersion = correctedVersion.replace(new RegExp(correction.original, 'gi'),
431
+ `<span class="highlight">${correction.corrected}</span>`);
432
+ });
433
+
434
+ correctedText.innerHTML = correctedVersion;
435
+
436
+ // Populate corrections details
437
+ correctionsDetails.innerHTML = '';
438
+ sampleCorrections.forEach(correction => {
439
+ const correctionItem = document.querySelector('.correction-item').cloneNode(true);
440
+ correctionItem.classList.remove('hidden');
441
+
442
+ correctionItem.querySelector('h4').textContent = `${correction.type} Correction`;
443
+ correctionItem.querySelector('.original-word').textContent = correction.original;
444
+ correctionItem.querySelector('.corrected-word').textContent = correction.corrected;
445
+ correctionItem.querySelector('p').innerHTML = `Changed from "<span class="original-word font-medium">${correction.original}</span>" to "<span class="corrected-word font-medium text-green-600">${correction.corrected}</span>"`;
446
+ correctionItem.querySelector('span').textContent = correction.type;
447
+
448
+ correctionsDetails.appendChild(correctionItem);
449
+ });
450
+
451
+ // Random processing time for demo
452
+ const randomTime = (0.3 + Math.random() * 0.4).toFixed(2);
453
+ processingTime.textContent = `${randomTime}s`;
454
+
455
+ // Show results section
456
+ resultsSection.classList.remove('hidden');
457
+
458
+ // Reset button
459
+ processBtn.innerHTML = '<i class="fas fa-play mr-2"></i> Process Text';
460
+ processBtn.disabled = false;
461
+
462
+ // Scroll to results
463
+ resultsSection.scrollIntoView({ behavior: 'smooth' });
464
+ }, 1500);
465
+ });
466
+
467
+ // Sample text button
468
+ document.querySelector('[title="Sample Text"]').addEventListener('click', function() {
469
+ 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.`;
470
+ inputText.value = sampleText;
471
+
472
+ // Trigger input event to update stats
473
+ const event = new Event('input');
474
+ inputText.dispatchEvent(event);
475
+ });
476
+
477
+ // Clear button
478
+ document.querySelector('[title="Clear"]').addEventListener('click', function() {
479
+ inputText.value = '';
480
+
481
+ // Trigger input event to update stats
482
+ const event = new Event('input');
483
+ inputText.dispatchEvent(event);
484
+
485
+ // Hide results if visible
486
+ resultsSection.classList.add('hidden');
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>
491
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ https://huggingface.co/spaces/doctorblo/systeme-correction