Ivan1008 commited on
Commit
d8a239e
·
verified ·
1 Parent(s): 9e0a567

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +521 -19
index.html CHANGED
@@ -1,19 +1,521 @@
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="ru">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>AI Capabilities Showcase</title>
7
+
8
+ <!-- Google Fonts: Inter and JetBrains Mono for a tech feel -->
9
+ <link rel="preconnect" href="https://fonts.googleapis.com">
10
+ <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
11
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;800&family=JetBrains+Mono:wght@400;700&display=swap" rel="stylesheet">
12
+
13
+ <!-- FontAwesome for Icons -->
14
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
15
+
16
+ <style>
17
+ :root {
18
+ /* Color Palette - Cyberpunk / Deep Space */
19
+ --bg-color: #0f172a;
20
+ --bg-gradient: radial-gradient(circle at 50% 50%, #1e293b 0%, #0f172a 100%);
21
+ --accent-primary: #38bdf8; /* Sky Blue */
22
+ --accent-secondary: #818cf8; /* Indigo */
23
+ --accent-glow: rgba(56, 189, 248, 0.5);
24
+ --glass-bg: rgba(30, 41, 59, 0.7);
25
+ --glass-border: rgba(255, 255, 255, 0.1);
26
+ --text-main: #f1f5f9;
27
+ --text-muted: #94a3b8;
28
+ --card-hover: rgba(56, 189, 248, 0.1);
29
+ }
30
+
31
+ * {
32
+ margin: 0;
33
+ padding: 0;
34
+ box-sizing: border-box;
35
+ }
36
+
37
+ body {
38
+ font-family: 'Inter', sans-serif;
39
+ background: var(--bg-color);
40
+ background-image: var(--bg-gradient);
41
+ color: var(--text-main);
42
+ min-height: 100vh;
43
+ overflow-x: hidden;
44
+ line-height: 1.6;
45
+ }
46
+
47
+ /* --- Background Animation --- */
48
+ .bg-orb {
49
+ position: fixed;
50
+ border-radius: 50%;
51
+ filter: blur(80px);
52
+ z-index: -1;
53
+ opacity: 0.6;
54
+ animation: float 10s infinite ease-in-out alternate;
55
+ }
56
+
57
+ .orb-1 {
58
+ width: 400px;
59
+ height: 400px;
60
+ background: var(--accent-secondary);
61
+ top: -100px;
62
+ left: -100px;
63
+ }
64
+
65
+ .orb-2 {
66
+ width: 300px;
67
+ height: 300px;
68
+ background: var(--accent-primary);
69
+ bottom: -50px;
70
+ right: -50px;
71
+ animation-delay: -5s;
72
+ }
73
+
74
+ @keyframes float {
75
+ 0% { transform: translate(0, 0); }
76
+ 100% { transform: translate(30px, 50px); }
77
+ }
78
+
79
+ /* --- Layout --- */
80
+ .container {
81
+ max-width: 1200px;
82
+ margin: 0 auto;
83
+ padding: 0 2rem;
84
+ position: relative;
85
+ }
86
+
87
+ /* --- Header --- */
88
+ header {
89
+ padding: 2rem 0;
90
+ display: flex;
91
+ justify-content: space-between;
92
+ align-items: center;
93
+ backdrop-filter: blur(5px);
94
+ }
95
+
96
+ .logo {
97
+ font-family: 'JetBrains Mono', monospace;
98
+ font-weight: 700;
99
+ font-size: 1.5rem;
100
+ color: var(--text-main);
101
+ text-decoration: none;
102
+ display: flex;
103
+ align-items: center;
104
+ gap: 10px;
105
+ }
106
+
107
+ .logo i {
108
+ color: var(--accent-primary);
109
+ }
110
+
111
+ .anycoder-link {
112
+ background: rgba(255, 255, 255, 0.1);
113
+ backdrop-filter: blur(10px);
114
+ border: 1px solid var(--glass-border);
115
+ padding: 0.5rem 1rem;
116
+ border-radius: 20px;
117
+ font-size: 0.85rem;
118
+ text-decoration: none;
119
+ color: var(--text-muted);
120
+ transition: all 0.3s ease;
121
+ display: flex;
122
+ align-items: center;
123
+ gap: 8px;
124
+ }
125
+
126
+ .anycoder-link:hover {
127
+ background: var(--accent-primary);
128
+ color: var(--bg-color);
129
+ transform: translateY(-2px);
130
+ box-shadow: 0 0 15px var(--accent-glow);
131
+ }
132
+
133
+ /* --- Hero Section --- */
134
+ .hero {
135
+ text-align: center;
136
+ padding: 6rem 0 4rem;
137
+ }
138
+
139
+ .hero h1 {
140
+ font-size: clamp(2.5rem, 5vw, 5rem);
141
+ font-weight: 800;
142
+ line-height: 1.1;
143
+ margin-bottom: 1.5rem;
144
+ background: linear-gradient(to right, #fff, var(--accent-primary));
145
+ -webkit-background-clip: text;
146
+ -webkit-text-fill-color: transparent;
147
+ opacity: 0;
148
+ animation: fadeIn 1s ease forwards 0.2s;
149
+ }
150
+
151
+ .hero p {
152
+ font-size: 1.25rem;
153
+ color: var(--text-muted);
154
+ max-width: 600px;
155
+ margin: 0 auto 3rem;
156
+ opacity: 0;
157
+ animation: fadeIn 1s ease forwards 0.5s;
158
+ }
159
+
160
+ @keyframes fadeIn {
161
+ to { opacity: 1; transform: translateY(0); }
162
+ from { opacity: 0; transform: translateY(20px); }
163
+ }
164
+
165
+ /* --- Features Grid --- */
166
+ .features {
167
+ display: grid;
168
+ grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
169
+ gap: 2rem;
170
+ padding-bottom: 6rem;
171
+ }
172
+
173
+ .card {
174
+ background: var(--glass-bg);
175
+ border: 1px solid var(--glass-border);
176
+ border-radius: 16px;
177
+ padding: 2rem;
178
+ transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
179
+ position: relative;
180
+ overflow: hidden;
181
+ cursor: pointer;
182
+ opacity: 0;
183
+ animation: slideUp 0.8s ease forwards;
184
+ }
185
+
186
+ .card:nth-child(1) { animation-delay: 0.6s; }
187
+ .card:nth-child(2) { animation-delay: 0.8s; }
188
+ .card:nth-child(3) { animation-delay: 1.0s; }
189
+ .card:nth-child(4) { animation-delay: 1.2s; }
190
+
191
+ @keyframes slideUp {
192
+ from { opacity: 0; transform: translateY(30px); }
193
+ to { opacity: 1; transform: translateY(0); }
194
+ }
195
+
196
+ .card:hover {
197
+ transform: translateY(-10px);
198
+ background: var(--card-hover);
199
+ border-color: var(--accent-primary);
200
+ box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
201
+ }
202
+
203
+ .card-icon {
204
+ width: 50px;
205
+ height: 50px;
206
+ background: rgba(255, 255, 255, 0.05);
207
+ border-radius: 12px;
208
+ display: flex;
209
+ align-items: center;
210
+ justify-content: center;
211
+ font-size: 1.5rem;
212
+ color: var(--accent-primary);
213
+ margin-bottom: 1.5rem;
214
+ transition: transform 0.3s ease;
215
+ }
216
+
217
+ .card:hover .card-icon {
218
+ transform: scale(1.1) rotate(5deg);
219
+ background: var(--accent-primary);
220
+ color: var(--bg-color);
221
+ }
222
+
223
+ .card h3 {
224
+ font-size: 1.25rem;
225
+ margin-bottom: 0.75rem;
226
+ font-weight: 600;
227
+ }
228
+
229
+ .card p {
230
+ color: var(--text-muted);
231
+ font-size: 0.95rem;
232
+ }
233
+
234
+ /* --- Interactive Demo Section --- */
235
+ .demo-section {
236
+ background: rgba(255, 255, 255, 0.03);
237
+ border: 1px solid var(--glass-border);
238
+ border-radius: 24px;
239
+ padding: 3rem;
240
+ margin-bottom: 4rem;
241
+ text-align: center;
242
+ }
243
+
244
+ .demo-title {
245
+ font-size: 1.5rem;
246
+ margin-bottom: 1.5rem;
247
+ }
248
+
249
+ .chat-interface {
250
+ max-width: 600px;
251
+ margin: 0 auto;
252
+ display: flex;
253
+ flex-direction: column;
254
+ gap: 1rem;
255
+ }
256
+
257
+ .chat-box {
258
+ background: rgba(0, 0, 0, 0.3);
259
+ border-radius: 12px;
260
+ padding: 1.5rem;
261
+ min-height: 120px;
262
+ text-align: left;
263
+ border: 1px solid transparent;
264
+ transition: border-color 0.3s;
265
+ }
266
+
267
+ .chat-box.active {
268
+ border-color: var(--accent-secondary);
269
+ }
270
+
271
+ .chat-input-group {
272
+ display: flex;
273
+ gap: 10px;
274
+ }
275
+
276
+ input[type="text"] {
277
+ flex: 1;
278
+ background: rgba(255, 255, 255, 0.05);
279
+ border: 1px solid var(--glass-border);
280
+ padding: 1rem;
281
+ border-radius: 12px;
282
+ color: white;
283
+ font-family: 'Inter', sans-serif;
284
+ outline: none;
285
+ transition: all 0.3s;
286
+ }
287
+
288
+ input[type="text"]:focus {
289
+ border-color: var(--accent-primary);
290
+ background: rgba(255, 255, 255, 0.1);
291
+ }
292
+
293
+ button {
294
+ background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
295
+ border: none;
296
+ padding: 0 2rem;
297
+ border-radius: 12px;
298
+ color: white;
299
+ font-weight: 600;
300
+ cursor: pointer;
301
+ transition: transform 0.2s, box-shadow 0.2s;
302
+ }
303
+
304
+ button:hover {
305
+ transform: scale(1.05);
306
+ box-shadow: 0 0 20px var(--accent-glow);
307
+ }
308
+
309
+ button:active {
310
+ transform: scale(0.95);
311
+ }
312
+
313
+ .typing-indicator {
314
+ display: none;
315
+ font-size: 0.9rem;
316
+ color: var(--accent-primary);
317
+ margin-top: 10px;
318
+ }
319
+
320
+ .typing-indicator span {
321
+ animation: blink 1.4s infinite both;
322
+ }
323
+ .typing-indicator span:nth-child(2) { animation-delay: 0.2s; }
324
+ .typing-indicator span:nth-child(3) { animation-delay: 0.4s; }
325
+
326
+ @keyframes blink {
327
+ 0% { opacity: 0.2; }
328
+ 20% { opacity: 1; }
329
+ 100% { opacity: 0.2; }
330
+ }
331
+
332
+ /* --- Footer --- */
333
+ footer {
334
+ text-align: center;
335
+ padding: 2rem;
336
+ color: var(--text-muted);
337
+ font-size: 0.9rem;
338
+ border-top: 1px solid var(--glass-border);
339
+ margin-top: auto;
340
+ }
341
+
342
+ /* --- Responsive Tweaks --- */
343
+ @media (max-width: 768px) {
344
+ header {
345
+ flex-direction: column;
346
+ gap: 1rem;
347
+ }
348
+
349
+ .hero h1 {
350
+ font-size: 2.5rem;
351
+ }
352
+
353
+ .demo-section {
354
+ padding: 1.5rem;
355
+ }
356
+ }
357
+ </style>
358
+ </head>
359
+ <body>
360
+
361
+ <!-- Background Decoration -->
362
+ <div class="bg-orb orb-1"></div>
363
+ <div class="bg-orb orb-2"></div>
364
+
365
+ <div class="container">
366
+ <!-- Header -->
367
+ <header>
368
+ <a href="#" class="logo">
369
+ <i class="fa-solid fa-robot"></i>
370
+ <span>AI Assistant</span>
371
+ </a>
372
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
373
+ <i class="fa-solid fa-code-branch"></i>
374
+ Built with anycoder
375
+ </a>
376
+ </header>
377
+
378
+ <!-- Main Content -->
379
+ <main>
380
+ <!-- Hero Section -->
381
+ <section class="hero">
382
+ <h1>Что ты умеешь?</h1>
383
+ <p>
384
+ Отвечаю на вопросы, пишу код, помогаю с анализом данных и переводами.
385
+ Превращаю сложные задачи в простые решения.
386
+ </p>
387
+ </section>
388
+
389
+ <!-- Features Grid -->
390
+ <section class="features">
391
+ <div class="card">
392
+ <div class="card-icon"><i class="fa-solid fa-code"></i></div>
393
+ <h3>Программирование</h3>
394
+ <p>Пишет чистый, эффективный код на HTML, CSS, JavaScript и других языках. Помогает отлаживать и оптимизировать.</p>
395
+ </div>
396
+ <div class="card">
397
+ <div class="card-icon"><i class="fa-solid fa-pen-nib"></i></div>
398
+ <h3>Написание текстов</h3>
399
+ <p>Создает контент, статьи, посты для социальных сетей и креативные тексты на русском и английском.</p>
400
+ </div>
401
+ <div class="card">
402
+ <div class="card-icon"><i class="fa-solid fa-language"></i></div>
403
+ <h3>Перевод</h3>
404
+ <p>Точный перевод между множеством языков, сохраняя контекст и стиль оригинала.</p>
405
+ </div>
406
+ <div class="card">
407
+ <div class="card-icon"><i class="fa-solid fa-brain"></i></div>
408
+ <h3>Анализ данных</h3>
409
+ <p>Интерпретирует информацию, находит закономерности и помогает принимать решения на основе данных.</p>
410
+ </div>
411
+ </section>
412
+
413
+ <!-- Interactive Demo -->
414
+ <section class="demo-section">
415
+ <h2 class="demo-title">Попробуй сам</h2>
416
+ <div class="chat-interface">
417
+ <div class="chat-box" id="chatBox">
418
+ <p id="chatText">Привет! Я готов помочь. Напиши мне ваш вопрос...</p>
419
+ <div class="typing-indicator" id="typingIndicator">
420
+ <span>.</span><span>.</span><span>.</span>
421
+ </div>
422
+ </div>
423
+ <div class="chat-input-group">
424
+ <input type="text" id="userInput" placeholder="Введите вопрос..." autocomplete="off">
425
+ <button type="button" id="sendBtn">Отправить</button>
426
+ </div>
427
+ </div>
428
+ </section>
429
+ </main>
430
+
431
+ <!-- Footer -->
432
+ <footer>
433
+ <p>&copy; 2023 AI Demo. All rights reserved.</p>
434
+ </footer>
435
+ </div>
436
+
437
+ <script>
438
+ // DOM Elements
439
+ const userInput = document.getElementById('userInput');
440
+ const sendBtn = document.getElementById('sendBtn');
441
+ const chatBox = document.getElementById('chatBox');
442
+ const chatText = document.getElementById('chatText');
443
+ const typingIndicator = document.getElementById('typingIndicator');
444
+
445
+ // Simple logic to simulate AI response
446
+ const responses = [
447
+ "Я могу помочь вам с написанием кода, созданием контента или решением логических задач!",
448
+ "Конечно! Мои возможности включают генерацию текста, анализ данных и создание веб-страниц.",
449
+ "Я обучен на большом объеме данных, поэтому могу поддерживать разговор на множество тем.",
450
+ "Если вы ищете решение, попробуйте сформулировать вопрос точнее. Я постараюсь помочь!"
451
+ ];
452
+
453
+ function addMessage(text, isUser = false) {
454
+ // Clear typing indicator if visible
455
+ typingIndicator.style.display = 'none';
456
+
457
+ // Add fade-in effect
458
+ const p = document.createElement('p');
459
+ p.style.opacity = '0';
460
+ p.style.transition = 'opacity 0.5s ease';
461
+
462
+ if (isUser) {
463
+ p.style.textAlign = 'right';
464
+ p.style.color = 'var(--accent-primary)';
465
+ p.style.fontWeight = 'bold';
466
+ }
467
+
468
+ p.textContent = text;
469
+ chatBox.insertBefore(p, typingIndicator);
470
+
471
+ // Trigger animation
472
+ setTimeout(() => p.style.opacity = '1', 10);
473
+
474
+ // Scroll to bottom
475
+ chatBox.scrollTop = chatBox.scrollHeight;
476
+ }
477
+
478
+ function handleInteraction() {
479
+ const text = userInput.value.trim();
480
+ if (!text) return;
481
+
482
+ // 1. Add User Message
483
+ addMessage(text, true);
484
+ userInput.value = '';
485
+
486
+ // 2. Show Typing Indicator
487
+ chatBox.classList.add('active');
488
+ typingIndicator.style.display = 'block';
489
+ chatBox.scrollTop = chatBox.scrollHeight;
490
+
491
+ // 3. Simulate AI Thinking Delay
492
+ setTimeout(() => {
493
+ // Randomly select a response if specific keywords aren't found (simplified logic)
494
+ const randomResponse = responses[Math.floor(Math.random() * responses.length)];
495
+ addMessage(randomResponse, false);
496
+ chatBox.classList.remove('active');
497
+ }, 1500);
498
+ }
499
+
500
+ // Event Listeners
501
+ sendBtn.addEventListener('click', handleInteraction);
502
+
503
+ userInput.addEventListener('keypress', (e) => {
504
+ if (e.key === 'Enter') {
505
+ handleInteraction();
506
+ }
507
+ });
508
+
509
+ // Add some interactivity to cards
510
+ document.querySelectorAll('.card').forEach(card => {
511
+ card.addEventListener('click', function() {
512
+ // Click effect
513
+ this.style.transform = 'scale(0.95)';
514
+ setTimeout(() => {
515
+ this.style.transform = '';
516
+ }, 150);
517
+ });
518
+ });
519
+ </script>
520
+ </body>
521
+ </html>