mgbam commited on
Commit
9337aa1
·
verified ·
1 Parent(s): 8475b6f

Delete static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +0 -424
static/index.html DELETED
@@ -1,424 +0,0 @@
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>AnyCoder AI Code Generator</title>
7
- <meta name="description" content="Generate, modify, and understand code with the most advanced AI models." />
8
- <style>
9
- :root {
10
- --bg: #0d1117;
11
- --bg-secondary: #161b22;
12
- --border: #30363d;
13
- --text: #c9d1d9;
14
- --text-muted: #8b949e;
15
- --accent: #58a6ff;
16
- --accent-hover: #79c0ff;
17
- --danger: #f85149;
18
- --success: #56d364;
19
- --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
20
- --radius: 8px;
21
- --transition: 0.2s ease;
22
- }
23
-
24
- * {
25
- box-sizing: border-box;
26
- margin: 0;
27
- padding: 0;
28
- }
29
-
30
- body {
31
- font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
32
- background: var(--bg);
33
- color: var(--text);
34
- line-height: 1.6;
35
- padding: 1rem;
36
- }
37
-
38
- header {
39
- text-align: center;
40
- margin-bottom: 2rem;
41
- }
42
-
43
- header h1 {
44
- font-size: 2.5rem;
45
- margin-bottom: 0.5rem;
46
- }
47
-
48
- header p {
49
- color: var(--text-muted);
50
- font-size: 1.1rem;
51
- }
52
-
53
- main {
54
- max-width: 900px;
55
- margin: 0 auto;
56
- display: grid;
57
- gap: 2rem;
58
- }
59
-
60
- section {
61
- background: var(--bg-secondary);
62
- border: 1px solid var(--border);
63
- border-radius: var(--radius);
64
- padding: 1.5rem;
65
- }
66
-
67
- h2 {
68
- font-size: 1.25rem;
69
- margin-bottom: 1rem;
70
- }
71
-
72
- label {
73
- display: block;
74
- margin-bottom: 0.5rem;
75
- font-weight: 600;
76
- }
77
-
78
- select,
79
- input[type="file"],
80
- input[type="url"],
81
- textarea {
82
- width: 100%;
83
- padding: 0.75rem;
84
- border: 1px solid var(--border);
85
- border-radius: var(--radius);
86
- background: var(--bg);
87
- color: var(--text);
88
- font-size: 1rem;
89
- transition: border-color var(--transition);
90
- }
91
-
92
- select:focus,
93
- input:focus,
94
- textarea:focus {
95
- outline: none;
96
- border-color: var(--accent);
97
- }
98
-
99
- textarea {
100
- resize: vertical;
101
- min-height: 120px;
102
- font-family: var(--font-mono);
103
- }
104
-
105
- .tabs {
106
- display: flex;
107
- gap: 0.5rem;
108
- margin-bottom: 1rem;
109
- }
110
-
111
- .tabs button {
112
- background: transparent;
113
- border: 1px solid var(--border);
114
- border-radius: var(--radius);
115
- padding: 0.5rem 1rem;
116
- color: var(--text-muted);
117
- cursor: pointer;
118
- transition: background var(--transition), color var(--transition);
119
- }
120
-
121
- .tabs button[aria-selected="true"] {
122
- background: var(--accent);
123
- color: var(--bg);
124
- border-color: var(--accent);
125
- }
126
-
127
- .tabs button:hover:not([aria-selected="true"]) {
128
- background: var(--border);
129
- color: var(--text);
130
- }
131
-
132
- .search-toggle {
133
- display: flex;
134
- align-items: center;
135
- gap: 0.5rem;
136
- margin-top: 1rem;
137
- }
138
-
139
- .actions {
140
- display: flex;
141
- gap: 1rem;
142
- justify-content: flex-end;
143
- }
144
-
145
- button {
146
- padding: 0.75rem 1.5rem;
147
- border: none;
148
- border-radius: var(--radius);
149
- font-size: 1rem;
150
- cursor: pointer;
151
- transition: background var(--transition);
152
- }
153
-
154
- #clear {
155
- background: var(--border);
156
- color: var(--text);
157
- }
158
-
159
- #clear:hover {
160
- background: var(--text-muted);
161
- }
162
-
163
- #generate {
164
- background: var(--accent);
165
- color: var(--bg);
166
- }
167
-
168
- #generate:hover {
169
- background: var(--accent-hover);
170
- }
171
-
172
- pre {
173
- background: var(--bg);
174
- border: 1px solid var(--border);
175
- border-radius: var(--radius);
176
- padding: 1rem;
177
- overflow-x: auto;
178
- font-family: var(--font-mono);
179
- font-size: 0.9rem;
180
- }
181
-
182
- iframe {
183
- width: 100%;
184
- height: 400px;
185
- border: 1px solid var(--border);
186
- border-radius: var(--radius);
187
- background: #fff;
188
- }
189
-
190
- .visually-hidden {
191
- position: absolute;
192
- width: 1px;
193
- height: 1px;
194
- overflow: hidden;
195
- clip: rect(0 0 0 0);
196
- white-space: nowrap;
197
- }
198
-
199
- @media (max-width: 600px) {
200
- body {
201
- padding: 0.5rem;
202
- }
203
-
204
- header h1 {
205
- font-size: 2rem;
206
- }
207
-
208
- .actions {
209
- flex-direction: column;
210
- }
211
- }
212
- </style>
213
- </head>
214
- <body>
215
- <header>
216
- <h1>🚀 AnyCoder AI</h1>
217
- <p>Your AI partner for generating, modifying, and understanding code.</p>
218
- </header>
219
-
220
- <main>
221
- <section aria-labelledby="model-selection">
222
- <h2 id="model-selection">1. Select Model</h2>
223
- <label for="model" class="visually-hidden">AI Model</label>
224
- <select id="model" name="model">
225
- <!-- options populated by script -->
226
- </select>
227
- </section>
228
-
229
- <section aria-labelledby="context-input">
230
- <h2 id="context-input">2. Provide Context</h2>
231
- <div class="tabs" role="tablist">
232
- <button role="tab" aria-selected="true" id="tab-prompt" aria-controls="panel-prompt">Prompt</button>
233
- <button role="tab" aria-selected="false" id="tab-file" aria-controls="panel-file">File</button>
234
- <button role="tab" aria-selected="false" id="tab-website" aria-controls="panel-website">Website</button>
235
- </div>
236
-
237
- <div role="tabpanel" id="panel-prompt">
238
- <textarea id="prompt" placeholder="Describe what you want to build…" aria-label="Prompt input"></textarea>
239
- </div>
240
- <div role="tabpanel" id="panel-file" hidden>
241
- <label for="reference-file">Reference File</label>
242
- <input type="file" id="reference-file" accept=".pdf,.docx,.txt" />
243
- </div>
244
- <div role="tabpanel" id="panel-website" hidden>
245
- <label for="website-url">Website URL</label>
246
- <input type="url" id="website-url" placeholder="https://example.com" />
247
- </div>
248
- </section>
249
-
250
- <section aria-labelledby="output-config">
251
- <h2 id="output-config">3. Configure Output</h2>
252
- <label for="language">Target Language</label>
253
- <select id="language">
254
- <option value="html">HTML</option>
255
- <option value="python">Python</option>
256
- <option value="javascript">JavaScript</option>
257
- <option value="transformers.js">Transformers.js</option>
258
- </select>
259
- <div class="search-toggle">
260
- <input type="checkbox" id="web-search" />
261
- <label for="web-search">Enable Web Search</label>
262
- </div>
263
- </section>
264
-
265
- <section class="actions">
266
- <button id="clear" type="button">Clear Session</button>
267
- <button id="generate" type="button">Generate Code</button>
268
- </section>
269
-
270
- <section aria-labelledby="output-tabs">
271
- <h2 id="output-tabs" class="visually-hidden">Output</h2>
272
- <div class="tabs" role="tablist">
273
- <button role="tab" aria-selected="true" id="tab-code" aria-controls="panel-code">Code</button>
274
- <button role="tab" aria-selected="false" id="tab-preview" aria-controls="panel-preview">Live Preview</button>
275
- <button role="tab" aria-selected="false" id="tab-history" aria-controls="panel-history">History</button>
276
- </div>
277
-
278
- <div role="tabpanel" id="panel-code">
279
- <pre><code id="code-output" class="language-html">&lt;/&gt;</code></pre>
280
- </div>
281
- <div role="tabpanel" id="panel-preview" hidden>
282
- <iframe id="preview" title="Live preview" sandbox="allow-scripts allow-same-origin"></iframe>
283
- </div>
284
- <div role="tabpanel" id="panel-history" hidden>
285
- <ul id="history-list" aria-live="polite"></ul>
286
- </div>
287
- </section>
288
- </main>
289
-
290
- <script>
291
- // Model definitions
292
- const AVAILABLE_MODELS = [
293
- {
294
- name: "Qwen/Qwen3-32B",
295
- id: "Qwen/Qwen3-32B",
296
- description: "Qwen3-32B model for code generation and general tasks"
297
- },
298
- {
299
- name: "Moonshot Kimi-K2",
300
- id: "moonshotai/Kimi-K2-Instruct",
301
- description: "Moonshot AI Kimi-K2-Instruct model for code generation and general tasks",
302
- default_provider: "groq"
303
- },
304
- {
305
- name: "DeepSeek V3",
306
- id: "deepseek-ai/DeepSeek-V3-0324",
307
- description: "DeepSeek V3 model for code generation"
308
- },
309
- {
310
- name: "DeepSeek R1",
311
- id: "deepseek-ai/DeepSeek-R1-0528",
312
- description: "DeepSeek R1 model for code generation"
313
- },
314
- {
315
- name: "ERNIE-4.5-VL",
316
- id: "baidu/ERNIE-4.5-VL-424B-A47B-Base-PT",
317
- description: "ERNIE-4.5-VL model for multimodal code generation with image support"
318
- },
319
- {
320
- name: "MiniMax M1",
321
- id: "MiniMaxAI/MiniMax-M1-80k",
322
- description: "MiniMax M1 model for code generation and general tasks"
323
- },
324
- {
325
- name: "Qwen3-235B-A22B",
326
- id: "Qwen/Qwen3-235B-A22B",
327
- description: "Qwen3-235B-A22B model for code generation and general tasks"
328
- },
329
- {
330
- name: "SmolLM3-3B",
331
- id: "HuggingFaceTB/SmolLM3-3B",
332
- description: "SmolLM3-3B model for code generation and general tasks"
333
- },
334
- {
335
- name: "GLM-4.1V-9B-Thinking",
336
- id: "THUDM/GLM-4.1V-9B-Thinking",
337
- description: "GLM-4.1V-9B-Thinking model for multimodal code generation with image support"
338
- },
339
- {
340
- name: "OpenAI GPT-4",
341
- id: "openai/gpt-4",
342
- description: "OpenAI GPT-4 model via HF Inference Providers",
343
- default_provider: "openai"
344
- },
345
- {
346
- name: "Gemini Pro",
347
- id: "gemini/pro",
348
- description: "Google Gemini Pro model via HF Inference Providers",
349
- default_provider: "gemini"
350
- },
351
- {
352
- name: "Fireworks AI",
353
- id: "fireworks-ai/fireworks-v1",
354
- description: "Fireworks AI model via HF Inference Providers",
355
- default_provider: "fireworks"
356
- }
357
- ];
358
-
359
- // Populate model dropdown
360
- const modelSelect = document.getElementById('model');
361
- AVAILABLE_MODELS.forEach(model => {
362
- const option = document.createElement('option');
363
- option.value = model.id;
364
- option.textContent = model.name;
365
- option.title = model.description;
366
- modelSelect.appendChild(option);
367
- });
368
-
369
- // Tab functionality
370
- function setupTabs(tabContainerSelector) {
371
- const tabContainer = document.querySelector(tabContainerSelector);
372
- const tabs = tabContainer.querySelectorAll('[role="tab"]');
373
- const panels = tabContainer.parentElement.querySelectorAll('[role="tabpanel"]');
374
-
375
- tabs.forEach(tab => {
376
- tab.addEventListener('click', () => {
377
- tabs.forEach(t => {
378
- t.setAttribute('aria-selected', 'false');
379
- t.tabIndex = -1;
380
- });
381
- tab.setAttribute('aria-selected', 'true');
382
- tab.tabIndex = 0;
383
-
384
- panels.forEach(panel => {
385
- panel.hidden = true;
386
- if (panel.id === tab.getAttribute('aria-controls')) {
387
- panel.hidden = false;
388
- }
389
- });
390
- });
391
- });
392
- }
393
-
394
- setupTabs('.tabs[role="tablist"]');
395
-
396
- // Clear session
397
- document.getElementById('clear').addEventListener('click', () => {
398
- document.getElementById('prompt').value = '';
399
- document.getElementById('reference-file').value = '';
400
- document.getElementById('website-url').value = '';
401
- document.getElementById('code-output').textContent = '</>';
402
- document.getElementById('preview').srcdoc = '';
403
- document.getElementById('history-list').innerHTML = '';
404
- });
405
-
406
- // Generate code (stub)
407
- document.getElementById('generate').addEventListener('click', () => {
408
- const prompt = document.getElementById('prompt').value.trim();
409
- const language = document.getElementById('language').value;
410
- if (!prompt) {
411
- alert('Please provide a prompt.');
412
- return;
413
- }
414
- // Simulate generation
415
- const code = `// Generated ${language} code\n// Prompt: ${prompt}\n\nconsole.log('Hello, AnyCoder AI!');`;
416
- document.getElementById('code-output').textContent = code;
417
- document.getElementById('preview').srcdoc = `<pre>${code}</pre>`;
418
- const li = document.createElement('li');
419
- li.textContent = new Date().toLocaleTimeString() + ' - ' + prompt.substring(0, 30) + '...';
420
- document.getElementById('history-list').prepend(li);
421
- });
422
- </script>
423
- </body>
424
- </html>