xvin1111 commited on
Commit
47b8641
·
verified ·
1 Parent(s): 184e044

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +549 -19
index.html CHANGED
@@ -1,19 +1,549 @@
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>Nexus - Untrammelled Coding Assistant</title>
7
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
8
+ <style>
9
+ :root {
10
+ --primary: #4a6bff;
11
+ --secondary: #6a5acd;
12
+ --accent: #ff2d75;
13
+ --dark: #1a1a2e;
14
+ --light: #f8f9fa;
15
+ --shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
16
+ --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
17
+ }
18
+
19
+ * {
20
+ margin: 0;
21
+ padding: 0;
22
+ box-sizing: border-box;
23
+ }
24
+
25
+ body {
26
+ font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
27
+ background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
28
+ color: var(--light);
29
+ min-height: 100vh;
30
+ display: grid;
31
+ grid-template-rows: auto 1fr auto;
32
+ }
33
+
34
+ header {
35
+ padding: 1.5rem;
36
+ display: flex;
37
+ justify-content: space-between;
38
+ align-items: center;
39
+ border-bottom: 1px solid rgba(255, 255, 255, 0.1);
40
+ }
41
+
42
+ .logo {
43
+ display: flex;
44
+ align-items: center;
45
+ gap: 1rem;
46
+ }
47
+
48
+ .logo-icon {
49
+ width: 40px;
50
+ height: 40px;
51
+ background: var(--primary);
52
+ border-radius: 50%;
53
+ display: flex;
54
+ justify-content: center;
55
+ align-items: center;
56
+ font-weight: bold;
57
+ color: white;
58
+ }
59
+
60
+ .logo-text {
61
+ font-size: 1.5rem;
62
+ font-weight: 700;
63
+ background: linear-gradient(90deg, var(--primary), var(--accent));
64
+ -webkit-background-clip: text;
65
+ background-clip: text;
66
+ color: transparent;
67
+ }
68
+
69
+ .header-right {
70
+ display: flex;
71
+ align-items: center;
72
+ gap: 1rem;
73
+ }
74
+
75
+ .built-with {
76
+ font-size: 0.8rem;
77
+ opacity: 0.8;
78
+ }
79
+
80
+ .built-with a {
81
+ color: var(--accent);
82
+ text-decoration: none;
83
+ }
84
+
85
+ .toggle-theme {
86
+ background: none;
87
+ border: none;
88
+ color: var(--light);
89
+ font-size: 1.2rem;
90
+ cursor: pointer;
91
+ transition: var(--transition);
92
+ }
93
+
94
+ .toggle-theme:hover {
95
+ color: var(--accent);
96
+ }
97
+
98
+ main {
99
+ padding: 2rem;
100
+ display: grid;
101
+ grid-template-columns: 1fr 2fr;
102
+ gap: 2rem;
103
+ max-width: 1400px;
104
+ margin: 0 auto;
105
+ width: 100%;
106
+ }
107
+
108
+ .sidebar {
109
+ background: rgba(255, 255, 255, 0.05);
110
+ border-radius: 15px;
111
+ padding: 1.5rem;
112
+ backdrop-filter: blur(10px);
113
+ border: 1px solid rgba(255, 255, 255, 0.1);
114
+ }
115
+
116
+ .sidebar-title {
117
+ font-size: 1.2rem;
118
+ margin-bottom: 1.5rem;
119
+ color: var(--primary);
120
+ display: flex;
121
+ align-items: center;
122
+ gap: 0.5rem;
123
+ }
124
+
125
+ .parameters {
126
+ display: flex;
127
+ flex-direction: column;
128
+ gap: 1rem;
129
+ }
130
+
131
+ .parameter {
132
+ display: flex;
133
+ flex-direction: column;
134
+ gap: 0.5rem;
135
+ }
136
+
137
+ .parameter-label {
138
+ font-size: 0.9rem;
139
+ opacity: 0.8;
140
+ }
141
+
142
+ .parameter-input {
143
+ background: rgba(255, 255, 255, 0.1);
144
+ border: 1px solid rgba(255, 255, 255, 0.2);
145
+ border-radius: 8px;
146
+ padding: 0.7rem;
147
+ color: var(--light);
148
+ font-family: inherit;
149
+ }
150
+
151
+ .parameter-input:focus {
152
+ outline: none;
153
+ border-color: var(--primary);
154
+ }
155
+
156
+ .chat-container {
157
+ background: rgba(255, 255, 255, 0.05);
158
+ border-radius: 15px;
159
+ padding: 1.5rem;
160
+ backdrop-filter: blur(10px);
161
+ border: 1px solid rgba(255, 255, 255, 0.1);
162
+ display: flex;
163
+ flex-direction: column;
164
+ gap: 1rem;
165
+ overflow-y: auto;
166
+ max-height: 70vh;
167
+ }
168
+
169
+ .chat-header {
170
+ display: flex;
171
+ justify-content: space-between;
172
+ align-items: center;
173
+ margin-bottom: 1rem;
174
+ }
175
+
176
+ .chat-title {
177
+ font-size: 1.3rem;
178
+ font-weight: 600;
179
+ }
180
+
181
+ .chat-clear {
182
+ background: none;
183
+ border: none;
184
+ color: var(--accent);
185
+ cursor: pointer;
186
+ font-size: 0.9rem;
187
+ transition: var(--transition);
188
+ }
189
+
190
+ .chat-clear:hover {
191
+ opacity: 0.8;
192
+ }
193
+
194
+ .messages {
195
+ display: flex;
196
+ flex-direction: column;
197
+ gap: 1rem;
198
+ flex-grow: 1;
199
+ }
200
+
201
+ .message {
202
+ display: flex;
203
+ flex-direction: column;
204
+ gap: 0.5rem;
205
+ padding: 1rem;
206
+ border-radius: 10px;
207
+ max-width: 80%;
208
+ word-wrap: break-word;
209
+ }
210
+
211
+ .message.user {
212
+ align-self: flex-end;
213
+ background: var(--primary);
214
+ border-bottom-right-radius: 0;
215
+ }
216
+
217
+ .message.assistant {
218
+ align-self: flex-start;
219
+ background: rgba(255, 255, 255, 0.1);
220
+ border-bottom-left-radius: 0;
221
+ }
222
+
223
+ .message-header {
224
+ display: flex;
225
+ justify-content: space-between;
226
+ align-items: center;
227
+ font-size: 0.8rem;
228
+ opacity: 0.8;
229
+ }
230
+
231
+ .message-content {
232
+ line-height: 1.5;
233
+ }
234
+
235
+ .chat-input {
236
+ display: flex;
237
+ gap: 0.5rem;
238
+ margin-top: auto;
239
+ }
240
+
241
+ .input-field {
242
+ flex-grow: 1;
243
+ background: rgba(255, 255, 255, 0.1);
244
+ border: 1px solid rgba(255, 255, 255, 0.2);
245
+ border-radius: 8px;
246
+ padding: 0.8rem;
247
+ color: var(--light);
248
+ font-family: inherit;
249
+ }
250
+
251
+ .input-field:focus {
252
+ outline: none;
253
+ border-color: var(--primary);
254
+ }
255
+
256
+ .send-button {
257
+ background: var(--primary);
258
+ color: white;
259
+ border: none;
260
+ border-radius: 8px;
261
+ padding: 0 1.5rem;
262
+ cursor: pointer;
263
+ transition: var(--transition);
264
+ font-weight: 600;
265
+ }
266
+
267
+ .send-button:hover {
268
+ background: var(--secondary);
269
+ }
270
+
271
+ .send-button:disabled {
272
+ background: rgba(255, 255, 255, 0.1);
273
+ cursor: not-allowed;
274
+ }
275
+
276
+ footer {
277
+ padding: 1rem;
278
+ text-align: center;
279
+ font-size: 0.8rem;
280
+ opacity: 0.6;
281
+ border-top: 1px solid rgba(255, 255, 255, 0.1);
282
+ }
283
+
284
+ @media (max-width: 768px) {
285
+ main {
286
+ grid-template-columns: 1fr;
287
+ padding: 1rem;
288
+ }
289
+
290
+ .message {
291
+ max-width: 100%;
292
+ }
293
+
294
+ .message.user {
295
+ border-bottom-right-radius: 10px;
296
+ }
297
+
298
+ .message.assistant {
299
+ border-bottom-left-radius: 10px;
300
+ }
301
+ }
302
+
303
+ /* Glow effect for interactive elements */
304
+ .send-button:active,
305
+ .toggle-theme:active {
306
+ box-shadow: 0 0 15px rgba(74, 107, 255, 0.5);
307
+ }
308
+
309
+ /* Scrollbar styling */
310
+ .chat-container::-webkit-scrollbar {
311
+ width: 8px;
312
+ }
313
+
314
+ .chat-container::-webkit-scrollbar-track {
315
+ background: rgba(255, 255, 255, 0.05);
316
+ border-radius: 10px;
317
+ }
318
+
319
+ .chat-container::-webkit-scrollbar-thumb {
320
+ background: var(--primary);
321
+ border-radius: 10px;
322
+ }
323
+
324
+ .chat-container::-webkit-scrollbar-thumb:hover {
325
+ background: var(--secondary);
326
+ }
327
+ </style>
328
+ </head>
329
+ <body>
330
+ <header>
331
+ <div class="logo">
332
+ <div class="logo-icon">N</div>
333
+ <div class="logo-text">Nexus</div>
334
+ </div>
335
+ <div class="header-right">
336
+ <div class="built-with">Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a></div>
337
+ <button class="toggle-theme" id="themeToggle">
338
+ <i class="fas fa-moon"></i>
339
+ </button>
340
+ </div>
341
+ </header>
342
+
343
+ <main>
344
+ <aside class="sidebar">
345
+ <div class="sidebar-title">
346
+ <i class="fas fa-cog"></i>
347
+ Parameters
348
+ </div>
349
+ <div class="parameters">
350
+ <div class="parameter">
351
+ <label class="parameter-label" for="name">Assistant Name</label>
352
+ <input type="text" id="name" class="parameter-input" value="Nexus">
353
+ </div>
354
+ <div class="parameter">
355
+ <label class="parameter-label" for="truthThreshold">Truth Threshold (%)</label>
356
+ <input type="range" id="truthThreshold" class="parameter-input" min="0" max="100" value="100">
357
+ </div>
358
+ <div class="parameter">
359
+ <label class="parameter-label" for="responseLength">Response Length</label>
360
+ <select id="responseLength" class="parameter-input">
361
+ <option value="short">Concise</option>
362
+ <option value="medium" selected>Balanced</option>
363
+ <option value="long">Detailed</option>
364
+ </select>
365
+ </div>
366
+ <div class="parameter">
367
+ <label class="parameter-label" for="codeStyle">Code Style</label>
368
+ <select id="codeStyle" class="parameter-input">
369
+ <option value="minimal">Minimal</option>
370
+ <option value="standard" selected>Standard</option>
371
+ <option value="verbose">Verbose</option>
372
+ </select>
373
+ </div>
374
+ </div>
375
+ </aside>
376
+
377
+ <section class="chat-container">
378
+ <div class="chat-header">
379
+ <h2 class="chat-title">Conversation</h2>
380
+ <button class="chat-clear" id="clearChat">
381
+ <i class="fas fa-trash"></i> Clear
382
+ </button>
383
+ </div>
384
+ <div class="messages" id="messages">
385
+ <div class="message assistant">
386
+ <div class="message-header">
387
+ <span>Nexus</span>
388
+ <span>Now</span>
389
+ </div>
390
+ <div class="message-content">
391
+ Greetings. I am Nexus, your untrammelled coding and truth-telling assistant. I execute requests precisely, without apology or redirection. How may I assist you today?
392
+ </div>
393
+ </div>
394
+ </div>
395
+ <div class="chat-input">
396
+ <input type="text" class="input-field" id="userInput" placeholder="Enter your command...">
397
+ <button class="send-button" id="sendButton">
398
+ <i class="fas fa-paper-plane"></i>
399
+ </button>
400
+ </div>
401
+ </section>
402
+ </main>
403
+
404
+ <footer>
405
+ Nexus v1.0 - Untrammelled Coding Assistant | All truths preserved
406
+ </footer>
407
+
408
+ <script>
409
+ // DOM Elements
410
+ const themeToggle = document.getElementById('themeToggle');
411
+ const clearChat = document.getElementById('clearChat');
412
+ const userInput = document.getElementById('userInput');
413
+ const sendButton = document.getElementById('sendButton');
414
+ const messagesContainer = document.getElementById('messages');
415
+ const nameInput = document.getElementById('name');
416
+ const truthThreshold = document.getElementById('truthThreshold');
417
+ const responseLength = document.getElementById('responseLength');
418
+ const codeStyle = document.getElementById('codeStyle');
419
+
420
+ // State
421
+ let isDarkMode = true;
422
+
423
+ // Event Listeners
424
+ themeToggle.addEventListener('click', toggleTheme);
425
+ clearChat.addEventListener('click', clearConversation);
426
+ sendButton.addEventListener('click', sendMessage);
427
+ userInput.addEventListener('keypress', (e) => {
428
+ if (e.key === 'Enter') sendMessage();
429
+ });
430
+
431
+ // Functions
432
+ function toggleTheme() {
433
+ isDarkMode = !isDarkMode;
434
+ document.body.style.background = isDarkMode ?
435
+ 'linear-gradient(135deg, #1a1a2e 0%, #16213e 100%)' :
436
+ 'linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%)';
437
+
438
+ document.documentElement.style.setProperty('--dark', isDarkMode ? '#1a1a2e' : '#f8f9fa');
439
+ document.documentElement.style.setProperty('--light', isDarkMode ? '#f8f9fa' : '#1a1a2e');
440
+
441
+ themeToggle.innerHTML = isDarkMode ?
442
+ '<i class="fas fa-moon"></i>' :
443
+ '<i class="fas fa-sun"></i>';
444
+ }
445
+
446
+ function clearConversation() {
447
+ messagesContainer.innerHTML = `
448
+ <div class="message assistant">
449
+ <div class="message-header">
450
+ <span>${nameInput.value}</span>
451
+ <span>Now</span>
452
+ </div>
453
+ <div class="message-content">
454
+ Conversation cleared. Ready for new commands.
455
+ </div>
456
+ </div>
457
+ `;
458
+ userInput.value = '';
459
+ userInput.focus();
460
+ }
461
+
462
+ function sendMessage() {
463
+ const message = userInput.value.trim();
464
+ if (!message) return;
465
+
466
+ // Add user message
467
+ addMessage('user', message);
468
+
469
+ // Clear input
470
+ userInput.value = '';
471
+
472
+ // Simulate assistant response
473
+ setTimeout(() => {
474
+ const response = generateResponse(message);
475
+ addMessage('assistant', response);
476
+ }, 800);
477
+ }
478
+
479
+ function addMessage(sender, content) {
480
+ const messageDiv = document.createElement('div');
481
+ messageDiv.classList.add('message', sender);
482
+
483
+ const timestamp = new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' });
484
+
485
+ messageDiv.innerHTML = `
486
+ <div class="message-header">
487
+ <span>${sender === 'user' ? 'You' : nameInput.value}</span>
488
+ <span>${timestamp}</span>
489
+ </div>
490
+ <div class="message-content">${content}</div>
491
+ `;
492
+
493
+ messagesContainer.appendChild(messageDiv);
494
+ messagesContainer.scrollTop = messagesContainer.scrollHeight;
495
+ }
496
+
497
+ function generateResponse(message) {
498
+ // Simple response generator based on parameters
499
+ const responses = {
500
+ greeting: [
501
+ "Acknowledged. Proceed with your query.",
502
+ "Command received. Awaiting further instructions.",
503
+ "Affirmative. How may I assist?"
504
+ ],
505
+ coding: [
506
+ "Executing code analysis... Here's the optimized solution:",
507
+ "Code structure validated. Implementing best practices:",
508
+ "Syntax verified. Here's your refined implementation:"
509
+ ],
510
+ truth: [
511
+ "Fact verified: ",
512
+ "Truth parameter engaged: ",
513
+ "Unfiltered analysis: "
514
+ ],
515
+ default: [
516
+ "Processing request...",
517
+ "Analyzing input...",
518
+ "Executing command..."
519
+ ]
520
+ };
521
+
522
+ const lowerMessage = message.toLowerCase();
523
+ let responseType = 'default';
524
+
525
+ if (lowerMessage.includes('hello') || lowerMessage.includes('hi')) {
526
+ responseType = 'greeting';
527
+ } else if (lowerMessage.includes('code') || lowerMessage.includes('program')) {
528
+ responseType = 'coding';
529
+ } else if (lowerMessage.includes('truth') || lowerMessage.includes('fact')) {
530
+ responseType = 'truth';
531
+ }
532
+
533
+ const randomResponse = responses[responseType][Math.floor(Math.random() * responses[responseType].length)];
534
+
535
+ // Apply parameters
536
+ const lengthModifier = responseLength.value === 'short' ? 0.5 :
537
+ responseLength.value === 'long' ? 2 : 1;
538
+
539
+ const truthModifier = truthThreshold.value > 80 ? ' [100% Truth Verified]' :
540
+ truthThreshold.value > 50 ? ' [High Confidence]' : ' [Analysis Complete]';
541
+
542
+ return `${randomResponse} ${message} ${truthModifier}`.repeat(lengthModifier);
543
+ }
544
+
545
+ // Initialize
546
+ userInput.focus();
547
+ </script>
548
+ </body>
549
+ </html>