Galaxydude2 commited on
Commit
8607989
·
verified ·
1 Parent(s): 672edb1

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +534 -19
index.html CHANGED
@@ -1,19 +1,534 @@
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>Gradio App Simulation & Error Fix</title>
7
+
8
+ <!-- Import Google Fonts for Modern Aesthetic -->
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;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
12
+
13
+ <!-- Font Awesome 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: Soft Blue Theme */
19
+ --primary-color: #3b82f6;
20
+ --primary-light: #dbeafe;
21
+ --primary-dark: #1e40af;
22
+ --accent-color: #0ea5e9;
23
+ --bg-color: #f0f4f8;
24
+ --card-bg: #ffffff;
25
+ --text-main: #1e293b;
26
+ --text-secondary: #64748b;
27
+ --border-color: #e2e8f0;
28
+ --error-bg: #fef2f2;
29
+ --error-text: #b91c1c;
30
+ --success-text: #059669;
31
+ }
32
+
33
+ * {
34
+ box-sizing: border-box;
35
+ margin: 0;
36
+ padding: 0;
37
+ }
38
+
39
+ body {
40
+ font-family: 'Inter', sans-serif;
41
+ background-color: var(--bg-color);
42
+ color: var(--text-main);
43
+ line-height: 1.6;
44
+ padding: 20px;
45
+ min-height: 100vh;
46
+ }
47
+
48
+ /* Header Section */
49
+ header {
50
+ max-width: 1200px;
51
+ margin: 0 auto 30px auto;
52
+ display: flex;
53
+ justify-content: space-between;
54
+ align-items: center;
55
+ padding-bottom: 20px;
56
+ border-bottom: 1px solid var(--border-color);
57
+ }
58
+
59
+ .brand {
60
+ display: flex;
61
+ align-items: center;
62
+ gap: 15px;
63
+ }
64
+
65
+ .brand-logo {
66
+ background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
67
+ padding: 10px;
68
+ border-radius: 12px;
69
+ color: white;
70
+ font-size: 24px;
71
+ box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.3);
72
+ }
73
+
74
+ .brand-text h1 {
75
+ font-size: 1.5rem;
76
+ font-weight: 700;
77
+ color: var(--text-main);
78
+ }
79
+
80
+ .brand-text span {
81
+ color: var(--text-secondary);
82
+ font-size: 0.9rem;
83
+ }
84
+
85
+ .anycoder-link {
86
+ text-decoration: none;
87
+ color: var(--text-secondary);
88
+ font-size: 0.85rem;
89
+ font-family: 'JetBrains Mono', monospace;
90
+ background: #e2e8f0;
91
+ padding: 6px 12px;
92
+ border-radius: 20px;
93
+ transition: all 0.3s ease;
94
+ }
95
+
96
+ .anycoder-link:hover {
97
+ background: var(--primary-light);
98
+ color: var(--primary-dark);
99
+ }
100
+
101
+ /* Main Layout */
102
+ main {
103
+ max-width: 1200px;
104
+ margin: 0 auto;
105
+ display: grid;
106
+ grid-template-columns: 350px 1fr;
107
+ gap: 30px;
108
+ }
109
+
110
+ @media (max-width: 900px) {
111
+ main {
112
+ grid-template-columns: 1fr;
113
+ }
114
+ }
115
+
116
+ /* Card Styles */
117
+ .card {
118
+ background: var(--card-bg);
119
+ border-radius: 16px;
120
+ box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
121
+ padding: 24px;
122
+ border: 1px solid var(--border-color);
123
+ transition: transform 0.2s;
124
+ }
125
+
126
+ .card:hover {
127
+ transform: translateY(-2px);
128
+ box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
129
+ }
130
+
131
+ h2 {
132
+ font-size: 1.25rem;
133
+ margin-bottom: 20px;
134
+ color: var(--text-main);
135
+ display: flex;
136
+ align-items: center;
137
+ gap: 10px;
138
+ }
139
+
140
+ /* Terminal / Console Section */
141
+ .terminal-window {
142
+ background-color: #0f172a;
143
+ border-radius: 12px;
144
+ overflow: hidden;
145
+ box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
146
+ font-family: 'JetBrains Mono', monospace;
147
+ font-size: 0.85rem;
148
+ height: 400px;
149
+ display: flex;
150
+ flex-direction: column;
151
+ }
152
+
153
+ .terminal-header {
154
+ background-color: #1e293b;
155
+ padding: 10px 15px;
156
+ display: flex;
157
+ gap: 8px;
158
+ border-bottom: 1px solid #334155;
159
+ }
160
+
161
+ .dot { width: 10px; height: 10px; border-radius: 50%; }
162
+ .red { background-color: #ef4444; }
163
+ .yellow { background-color: #f59e0b; }
164
+ .green { background-color: #10b981; }
165
+
166
+ .terminal-body {
167
+ flex: 1;
168
+ padding: 15px;
169
+ overflow-y: auto;
170
+ color: #e2e8f0;
171
+ }
172
+
173
+ .log-line { margin-bottom: 8px; }
174
+ .log-time { color: #64748b; margin-right: 10px; }
175
+ .log-info { color: #60a5fa; }
176
+ .log-warn { color: #fbbf24; }
177
+ .log-error { color: #f87171; font-weight: 600; }
178
+ .log-trace { color: #94a3b8; margin-left: 20px; font-size: 0.8em; border-left: 2px solid #475569; padding-left: 10px; }
179
+
180
+ /* Controls Section */
181
+ .control-group {
182
+ margin-bottom: 20px;
183
+ }
184
+
185
+ label {
186
+ display: block;
187
+ margin-bottom: 8px;
188
+ font-weight: 600;
189
+ color: var(--text-secondary);
190
+ font-size: 0.9rem;
191
+ }
192
+
193
+ input[type="text"], select {
194
+ width: 100%;
195
+ padding: 12px;
196
+ border: 1px solid var(--border-color);
197
+ border-radius: 8px;
198
+ font-size: 1rem;
199
+ font-family: 'Inter', sans-serif;
200
+ transition: border-color 0.3s;
201
+ background-color: #f8fafc;
202
+ }
203
+
204
+ input[type="text"]:focus, select:focus {
205
+ outline: none;
206
+ border-color: var(--primary-color);
207
+ background-color: white;
208
+ box-shadow: 0 0 0 3px var(--primary-light);
209
+ }
210
+
211
+ .btn {
212
+ width: 100%;
213
+ padding: 14px;
214
+ border: none;
215
+ border-radius: 8px;
216
+ font-size: 1rem;
217
+ font-weight: 600;
218
+ cursor: pointer;
219
+ transition: all 0.3s;
220
+ display: flex;
221
+ justify-content: center;
222
+ align-items: center;
223
+ gap: 10px;
224
+ }
225
+
226
+ .btn-primary {
227
+ background-color: var(--primary-color);
228
+ color: white;
229
+ box-shadow: 0 4px 6px -1px rgba(59, 130, 246, 0.4);
230
+ }
231
+
232
+ .btn-primary:hover {
233
+ background-color: var(--primary-dark);
234
+ transform: translateY(-1px);
235
+ box-shadow: 0 6px 8px -1px rgba(59, 130, 246, 0.5);
236
+ }
237
+
238
+ .btn-primary:active {
239
+ transform: translateY(0);
240
+ }
241
+
242
+ /* Result Section */
243
+ .result-box {
244
+ margin-top: 20px;
245
+ padding: 20px;
246
+ background-color: var(--primary-light);
247
+ border-radius: 12px;
248
+ border-left: 5px solid var(--primary-color);
249
+ display: none; /* Hidden by default */
250
+ animation: fadeIn 0.5s ease;
251
+ }
252
+
253
+ .result-box h3 {
254
+ color: var(--primary-dark);
255
+ margin-bottom: 10px;
256
+ font-size: 1.1rem;
257
+ }
258
+
259
+ .code-fix {
260
+ background-color: #0f172a;
261
+ color: #a5b4fc;
262
+ padding: 15px;
263
+ border-radius: 8px;
264
+ font-family: 'JetBrains Mono', monospace;
265
+ font-size: 0.85rem;
266
+ margin-top: 10px;
267
+ position: relative;
268
+ }
269
+
270
+ .code-fix::before {
271
+ content: "Fixed Python Code";
272
+ position: absolute;
273
+ top: 5px;
274
+ left: 10px;
275
+ font-size: 0.7rem;
276
+ color: #64748b;
277
+ text-transform: uppercase;
278
+ letter-spacing: 1px;
279
+ }
280
+
281
+ @keyframes fadeIn {
282
+ from { opacity: 0; transform: translateY(10px); }
283
+ to { opacity: 1; transform: translateY(0); }
284
+ }
285
+
286
+ /* Responsive Adjustments */
287
+ @media (max-width: 768px) {
288
+ header {
289
+ flex-direction: column;
290
+ align-items: flex-start;
291
+ gap: 20px;
292
+ }
293
+ .anycoder-link {
294
+ width: 100%;
295
+ text-align: center;
296
+ }
297
+ }
298
+ </style>
299
+ </head>
300
+ <body>
301
+
302
+ <!-- Header -->
303
+ <header>
304
+ <div class="brand">
305
+ <div class="brand-logo">
306
+ <i class="fa-solid fa-brain"></i>
307
+ </div>
308
+ <div class="brand-text">
309
+ <h1>AI Application Interface</h1>
310
+ <span>Simulated Gradio Environment</span>
311
+ </div>
312
+ </div>
313
+ <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank" class="anycoder-link">
314
+ Built with anycoder
315
+ </a>
316
+ </header>
317
+
318
+ <main>
319
+ <!-- Left Column: Controls & Terminal -->
320
+ <section>
321
+ <div class="card">
322
+ <h2><i class="fa-solid fa-terminal"></i> System Console</h2>
323
+ <div class="terminal-window">
324
+ <div class="terminal-header">
325
+ <div class="dot red"></div>
326
+ <div class="dot yellow"></div>
327
+ <div class="dot green"></div>
328
+ </div>
329
+ <div class="terminal-body" id="console-output">
330
+ <!-- Logs will be injected here via JS -->
331
+ </div>
332
+ </div>
333
+ </div>
334
+
335
+ <div class="card" style="margin-top: 20px;">
336
+ <h2><i class="fa-solid fa-sliders"></i> Configuration</h2>
337
+
338
+ <div class="control-group">
339
+ <label for="model-select">Model Selection</label>
340
+ <select id="model-select">
341
+ <option value="gpt-4">GPT-4 Turbo (Advanced)</option>
342
+ <option value="claude-3">Claude 3 Opus</option>
343
+ <option value="llama-3" selected>Llama 3 70B</option>
344
+ <option value="mistral">Mistral Large</option>
345
+ </select>
346
+ </div>
347
+
348
+ <div class="control-group">
349
+ <label for="user-input">Input Prompt</label>
350
+ <input type="text" id="user-input" placeholder="Type your query here..." value="Explain the error in the application startup log.">
351
+ </div>
352
+
353
+ <button class="btn btn-primary" id="generate-btn">
354
+ <i class="fa-solid fa-play"></i> Process Request
355
+ </button>
356
+
357
+ <div id="result-area" class="result-box">
358
+ <h3><i class="fa-solid fa-check-circle"></i> Output Generated</h3>
359
+ <p>The system successfully processed the request. Below is the analysis of the error found in the startup log:</p>
360
+
361
+ <div class="code-fix">
362
+ <div style="margin-bottom: 10px; color: #cbd5e1;">❌ Original (Broken):</div>
363
+ <div style="color: #f87171;">with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue")) as demo:</div>
364
+
365
+ <div style="margin: 15px 0 5px 0; color: #cbd5e1;">✅ Fixed (Modern Gradio):</div>
366
+ <div style="color: #a5b4fc;"># Gradio V5+ handles themes globally or via CSS.<br># Remove 'theme' argument from Blocks() to fix TypeError.</div>
367
+ <br>
368
+ <div style="color: #60a5fa;">with gr.Blocks() as demo:</div>
369
+ <div style="color: #60a5fa;"> # Add custom CSS for Soft Blue Theme</div>
370
+ <div style="color: #60a5fa;"> gr.Markdown('# Application Style', elem_classes="soft-blue")</div>
371
+ </div>
372
+ </div>
373
+ </div>
374
+ </section>
375
+
376
+ <!-- Right Column: Visualization -->
377
+ <section>
378
+ <div class="card">
379
+ <h2><i class="fa-solid fa-chart-simple"></i> Application Status</h2>
380
+
381
+ <div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 30px;">
382
+ <div style="background: var(--primary-light); padding: 20px; border-radius: 12px; text-align: center;">
383
+ <div style="font-size: 3rem; color: var(--primary-color); font-weight: 700;">0</div>
384
+ <div style="color: var(--text-secondary); margin-top: 5px;">Active Errors</div>
385
+ </div>
386
+ <div style="background: var(--primary-light); padding: 20px; border-radius: 12px; text-align: center;">
387
+ <div style="font-size: 3rem; color: var(--primary-color); font-weight: 700;">99.9%</div>
388
+ <div style="color: var(--text-secondary); margin-top: 5px;">Stability Score</div>
389
+ </div>
390
+ </div>
391
+
392
+ <div style="background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px; padding: 20px;">
393
+ <h3 style="font-size: 1rem; margin-bottom: 15px; color: var(--text-main);">Startup Sequence Timeline</h3>
394
+ <div style="position: relative; padding-left: 20px;">
395
+ <!-- Timeline Line -->
396
+ <div style="position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--border-color);"></div>
397
+
398
+ <div style="position: relative; margin-bottom: 25px;">
399
+ <div style="position: absolute; left: -26px; top: 5px; width: 10px; height: 10px; background: var(--border-color); border-radius: 50%;"></div>
400
+ <div style="color: var(--text-secondary); font-size: 0.85rem; font-weight: 600;">2026-02-08 09:25:30</div>
401
+ <div style="font-size: 1rem; color: var(--text-main);">Loading dependencies...</div>
402
+ </div>
403
+
404
+ <div style="position: relative; margin-bottom: 25px;">
405
+ <div style="position: absolute; left: -26px; top: 5px; width: 10px; height: 10px; background: var(--border-color); border-radius: 50%;"></div>
406
+ <div style="color: var(--text-secondary); font-size: 0.85rem; font-weight: 600;">2026-02-08 09:25:31</div>
407
+ <div style="font-size: 1rem; color: var(--text-main);">Initializing UI Blocks</div>
408
+ </div>
409
+
410
+ <div style="position: relative; margin-bottom: 0;">
411
+ <div style="position: absolute; left: -26px; top: 5px; width: 10px; height: 10px; background: var(--error-text); border: 2px solid white; box-shadow: 0 0 0 2px var(--error-text); border-radius: 50%;"></div>
412
+ <div style="color: var(--error-text); font-size: 0.85rem; font-weight: 600;">2026-02-08 09:25:31</div>
413
+ <div style="font-size: 1rem; color: var(--error-text);">Critical Error: TypeError</div>
414
+ <div style="font-size: 0.9rem; color: var(--text-secondary); margin-top: 5px; padding-left: 10px; border-left: 2px solid var(--border-color);">
415
+ BlockContext.__init__() got an unexpected keyword argument 'theme'
416
+ </div>
417
+ </div>
418
+ </div>
419
+ </div>
420
+ </div>
421
+
422
+ <div class="card" style="margin-top: 20px; background: linear-gradient(135deg, var(--primary-dark), var(--accent-color)); color: white;">
423
+ <h2 style="color: white; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 15px;">
424
+ <i class="fa-solid fa-lightbulb"></i> Solution Insight
425
+ </h2>
426
+ <p style="margin-bottom: 15px; line-height: 1.7;">
427
+ The error occurred because modern versions of Gradio (V5+) have deprecated the <code>theme</code> argument within the <code>gr.Blocks()</code> constructor.
428
+ </p>
429
+ <p style="line-height: 1.7; margin-bottom: 20px;">
430
+ To achieve the "Soft Blue" look, you should either use the global theme settings or apply custom CSS classes to your components.
431
+ </p>
432
+ <button class="btn" style="background-color: white; color: var(--primary-dark); width: auto; padding: 10px 20px;" onclick="window.scrollTo({top: document.querySelector('main').offsetTop, behavior: 'smooth'})">
433
+ <i class="fa-solid fa-arrow-up"></i> Back to Top
434
+ </button>
435
+ </div>
436
+ </section>
437
+ </main>
438
+
439
+ <script>
440
+ // DOM Elements
441
+ const consoleOutput = document.getElementById('console-output');
442
+ const generateBtn = document.getElementById('generate-btn');
443
+ const userInput = document.getElementById('user-input');
444
+ const resultArea = document.getElementById('result-area');
445
+
446
+ // Simulation Data
447
+ const startupLogs = [
448
+ { time: "2026-02-08 09:25:30", type: "info", msg: "Initializing application environment..." },
449
+ { time: "2026-02-08 09:25:30", type: "info", msg: "Loading Python 3.13 runtime..." },
450
+ { time: "2026-02-08 09:25:31", type: "info", msg: "Importing Gradio library..." },
451
+ { time: "2026-02-08 09:25:31", type: "info", msg: "Constructing UI Blocks..." },
452
+ { time: "2026-02-08 09:25:31", type: "error", msg: "Traceback (most recent call last):" },
453
+ { time: "2026-02-08 09:25:31", type: "trace", msg: "File \"/app/app.py\", line 113, in &lt;module&gt;" },
454
+ { time: "2026-02-08 09:25:31", type: "error", msg: "with gr.Blocks(theme=gr.themes.Soft(primary_hue=\"blue\")) as demo:" },
455
+ { time: "2026-02-08 09:25:31", type: "trace", msg: "~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" },
456
+ { time: "2026-02-08 09:25:31", type: "error", msg: "File \"/usr/local/lib/python3.13/site-packages/gradio/blocks.py\", line 1071, in __init__" },
457
+ { time: "2026-02-08 09:25:31", type: "error", msg: "super().__init__(render=False, **kwargs)" },
458
+ { time: "2026-02-08 09:25:31", type: "error", msg: "~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^" },
459
+ { time: "2026-02-08 09:25:31", type: "error", msg: "TypeError: BlockContext.__init__() got an unexpected keyword argument 'theme'" }
460
+ ];
461
+
462
+ // Function to generate random log lines for effect
463
+ function addLogLine(time, type, msg) {
464
+ const line = document.createElement('div');
465
+ line.className = 'log-line';
466
+
467
+ let colorClass = 'log-info';
468
+ if (type === 'warn') colorClass = 'log-warn';
469
+ if (type === 'error') colorClass = 'log-error';
470
+ if (type === 'trace') colorClass = 'log-trace';
471
+
472
+ line.innerHTML = `
473
+ <span class="log-time">[${time}]</span>
474
+ <span class="${colorClass}">${msg}</span>
475
+ `;
476
+ consoleOutput.appendChild(line);
477
+ consoleOutput.scrollTop = consoleOutput.scrollHeight;
478
+ }
479
+
480
+ // Initialize Terminal
481
+ function initTerminal() {
482
+ consoleOutput.innerHTML = ''; // Clear initial state
483
+ let delay = 0;
484
+
485
+ startupLogs.forEach((log) => {
486
+ delay += Math.random() * 400 + 200; // Random delay between 200ms and 600ms
487
+ setTimeout(() => {
488
+ addLogLine(log.time, log.type, log.msg);
489
+
490
+ // If it's the last line, show success state
491
+ if (log.type === 'error' && log.msg.includes('TypeError')) {
492
+ setTimeout(() => {
493
+ const fixLine = document.createElement('div');
494
+ fixLine.className = 'log-line';
495
+ fixLine.innerHTML = `<span class="log-time">[SYSTEM]</span> <span style="color: #10b981; font-weight: bold;">Error analysis complete. UI Fallback activated.</span>`;
496
+ consoleOutput.appendChild(fixLine);
497
+ consoleOutput.scrollTop = consoleOutput.scrollHeight;
498
+ }, 500);
499
+ }
500
+ }, delay);
501
+ });
502
+ }
503
+
504
+ // Button Interaction
505
+ generateBtn.addEventListener('click', () => {
506
+ // Visual feedback
507
+ generateBtn.innerHTML = '<i class="fa-solid fa-circle-notch fa-spin"></i> Processing...';
508
+ generateBtn.disabled = true;
509
+ resultArea.style.display = 'none';
510
+
511
+ // Simulate network request
512
+ setTimeout(() => {
513
+ generateBtn.innerHTML = '<i class="fa-solid fa-play"></i> Process Request';
514
+ generateBtn.disabled = false;
515
+
516
+ // Show Result
517
+ resultArea.style.display = 'block';
518
+
519
+ // Add success log
520
+ addLogLine(new Date().toLocaleTimeString(), 'info', `User input processed: "${userInput.value}"`);
521
+ addLogLine(new Date().toLocaleTimeString(), 'info', 'Response generated successfully.');
522
+
523
+ // Scroll to result
524
+ resultArea.scrollIntoView({ behavior: 'smooth', block: 'start' });
525
+
526
+ }, 1500);
527
+ });
528
+
529
+ // Run initialization
530
+ window.onload = initTerminal;
531
+
532
+ </script>
533
+ </body>
534
+ </html>