AiCoderv2 commited on
Commit
42ac864
·
verified ·
1 Parent(s): d06183a

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +241 -19
index.html CHANGED
@@ -1,19 +1,241 @@
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>ComfyUI Workflow</title>
7
+ <style>
8
+ body {
9
+ font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
10
+ background-color: #1e1e1e;
11
+ color: #d4d4d4;
12
+ margin: 0;
13
+ padding: 20px;
14
+ line-height: 1.4;
15
+ }
16
+ .header {
17
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
18
+ color: white;
19
+ padding: 20px;
20
+ border-radius: 10px;
21
+ margin-bottom: 20px;
22
+ text-align: center;
23
+ }
24
+ .header h1 {
25
+ margin: 0;
26
+ font-size: 2em;
27
+ }
28
+ .header a {
29
+ color: #ffffff;
30
+ text-decoration: none;
31
+ font-weight: bold;
32
+ opacity: 0.9;
33
+ }
34
+ .header a:hover {
35
+ opacity: 1;
36
+ text-decoration: underline;
37
+ }
38
+ .json-container {
39
+ background-color: #2d2d30;
40
+ border-radius: 8px;
41
+ padding: 20px;
42
+ overflow-x: auto;
43
+ border: 1px solid #3e3e42;
44
+ }
45
+ pre {
46
+ margin: 0;
47
+ white-space: pre-wrap;
48
+ word-wrap: break-word;
49
+ }
50
+ .json-key {
51
+ color: #9cdcfe;
52
+ }
53
+ .json-string {
54
+ color: #ce9178;
55
+ }
56
+ .json-number {
57
+ color: #b5cea8;
58
+ }
59
+ .json-boolean {
60
+ color: #569cd6;
61
+ }
62
+ .json-null {
63
+ color: #569cd6;
64
+ }
65
+ .copy-btn {
66
+ background: #007acc;
67
+ color: white;
68
+ border: none;
69
+ padding: 10px 20px;
70
+ border-radius: 5px;
71
+ cursor: pointer;
72
+ margin-bottom: 10px;
73
+ font-family: inherit;
74
+ }
75
+ .copy-btn:hover {
76
+ background: #005a9e;
77
+ }
78
+ .download-btn {
79
+ background: #28a745;
80
+ color: white;
81
+ border: none;
82
+ padding: 10px 20px;
83
+ border-radius: 5px;
84
+ cursor: pointer;
85
+ margin-bottom: 10px;
86
+ margin-left: 10px;
87
+ font-family: inherit;
88
+ }
89
+ .download-btn:hover {
90
+ background: #218838;
91
+ }
92
+ </style>
93
+ </head>
94
+ <body>
95
+ <div class="header">
96
+ <h1>ComfyUI Workflow</h1>
97
+ <p>Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a></p>
98
+ </div>
99
+
100
+ <button class="copy-btn" onclick="copyToClipboard()">📋 Copy JSON</button>
101
+ <button class="download-btn" onclick="downloadJSON()">💾 Download JSON</button>
102
+
103
+ <div class="json-container">
104
+ <pre id="json-content">{
105
+ "3": {
106
+ "class_type": "KSampler",
107
+ "inputs": {
108
+ "cfg": 8,
109
+ "denoise": 1,
110
+ "latent_image": [
111
+ "5",
112
+ 0
113
+ ],
114
+ "model": [
115
+ "4",
116
+ 0
117
+ ],
118
+ "negative": [
119
+ "7",
120
+ 0
121
+ ],
122
+ "positive": [
123
+ "6",
124
+ 0
125
+ ],
126
+ "sampler_name": "euler",
127
+ "scheduler": "normal",
128
+ "seed": 8566257,
129
+ "steps": 20
130
+ }
131
+ },
132
+ "4": {
133
+ "class_type": "CheckpointLoaderSimple",
134
+ "inputs": {
135
+ "ckpt_name": "lightx2v/Qwen-Image-Lightning"
136
+ }
137
+ },
138
+ "5": {
139
+ "class_type": "EmptyLatentImage",
140
+ "inputs": {
141
+ "batch_size": 1,
142
+ "height": 512,
143
+ "width": 512
144
+ }
145
+ },
146
+ "6": {
147
+ "class_type": "CLIPTextEncode",
148
+ "inputs": {
149
+ "clip": [
150
+ "4",
151
+ 1
152
+ ],
153
+ "text": "beautiful scenery nature glass bottle landscape, , purple galaxy bottle,"
154
+ }
155
+ },
156
+ "7": {
157
+ "class_type": "CLIPTextEncode",
158
+ "inputs": {
159
+ "clip": [
160
+ "4",
161
+ 1
162
+ ],
163
+ "text": "text, watermark"
164
+ }
165
+ },
166
+ "8": {
167
+ "class_type": "VAEDecode",
168
+ "inputs": {
169
+ "samples": [
170
+ "3",
171
+ 0
172
+ ],
173
+ "vae": [
174
+ "4",
175
+ 2
176
+ ]
177
+ }
178
+ },
179
+ "9": {
180
+ "class_type": "SaveImage",
181
+ "inputs": {
182
+ "filename_prefix": "ComfyUI",
183
+ "images": [
184
+ "8",
185
+ 0
186
+ ]
187
+ }
188
+ },
189
+ "metadata": {
190
+ "built_with": "anycoder",
191
+ "reference": "https://huggingface.co/spaces/akhaliq/anycoder"
192
+ }
193
+ }</pre>
194
+ </div>
195
+
196
+ <script>
197
+ function copyToClipboard() {
198
+ const jsonContent = document.getElementById('json-content').textContent;
199
+ navigator.clipboard.writeText(jsonContent).then(() => {
200
+ const btn = document.querySelector('.copy-btn');
201
+ const originalText = btn.textContent;
202
+ btn.textContent = '✅ Copied!';
203
+ setTimeout(() => {
204
+ btn.textContent = originalText;
205
+ }, 2000);
206
+ });
207
+ }
208
+
209
+ function downloadJSON() {
210
+ const jsonContent = document.getElementById('json-content').textContent;
211
+ const blob = new Blob([jsonContent], { type: 'application/json' });
212
+ const url = URL.createObjectURL(blob);
213
+ const a = document.createElement('a');
214
+ a.href = url;
215
+ a.download = 'comfyui_workflow.json';
216
+ document.body.appendChild(a);
217
+ a.click();
218
+ document.body.removeChild(a);
219
+ URL.revokeObjectURL(url);
220
+ }
221
+
222
+ // Add syntax highlighting
223
+ function highlightJSON() {
224
+ const content = document.getElementById('json-content');
225
+ let html = content.innerHTML;
226
+
227
+ // Highlight different JSON elements
228
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
229
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
230
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
231
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
232
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
233
+
234
+ content.innerHTML = html;
235
+ }
236
+
237
+ // Apply syntax highlighting after page load
238
+ window.addEventListener('load', highlightJSON);
239
+ </script>
240
+ </body>
241
+ </html>