BoobyBoobs commited on
Commit
08a46a0
·
verified ·
1 Parent(s): 7c50694

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +198 -19
index.html CHANGED
@@ -1,19 +1,198 @@
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
+ "last_node_id": 1,
106
+ "last_link_id": 1,
107
+ "nodes": [
108
+ {
109
+ "id": 1,
110
+ "type": "OpenAI Chat API Node ComfyUI Official Example",
111
+ "pos": [
112
+ 100,
113
+ 100
114
+ ],
115
+ "size": [
116
+ 300,
117
+ 200
118
+ ],
119
+ "flags": {},
120
+ "order": 0,
121
+ "mode": 0,
122
+ "inputs": [],
123
+ "outputs": [],
124
+ "properties": {
125
+ "comment": "Built with anycoder - https://huggingface.co/spaces/akhaliq/anycoder"
126
+ },
127
+ "widgets_values": [
128
+ "sk-your-api-key-here",
129
+ "gpt-4-vision-preview",
130
+ "You are a helpful assistant collaborating on a ComfyUI development project. Design a custom chat interface for dedicated AI communication outside of this development environment.",
131
+ "What tools do you have available for this chat interface design?",
132
+ 0.7,
133
+ 150,
134
+ false
135
+ ]
136
+ }
137
+ ],
138
+ "links": [],
139
+ "groups": [],
140
+ "config": {},
141
+ "extra": {
142
+ "ds": {
143
+ "scale": 1,
144
+ "offset": [
145
+ 0,
146
+ 0
147
+ ]
148
+ }
149
+ }
150
+ }</pre>
151
+ </div>
152
+
153
+ <script>
154
+ function copyToClipboard() {
155
+ const jsonContent = document.getElementById('json-content').textContent;
156
+ navigator.clipboard.writeText(jsonContent).then(() => {
157
+ const btn = document.querySelector('.copy-btn');
158
+ const originalText = btn.textContent;
159
+ btn.textContent = '✅ Copied!';
160
+ setTimeout(() => {
161
+ btn.textContent = originalText;
162
+ }, 2000);
163
+ });
164
+ }
165
+
166
+ function downloadJSON() {
167
+ const jsonContent = document.getElementById('json-content').textContent;
168
+ const blob = new Blob([jsonContent], { type: 'application/json' });
169
+ const url = URL.createObjectURL(blob);
170
+ const a = document.createElement('a');
171
+ a.href = url;
172
+ a.download = 'comfyui_workflow.json';
173
+ document.body.appendChild(a);
174
+ a.click();
175
+ document.body.removeChild(a);
176
+ URL.revokeObjectURL(url);
177
+ }
178
+
179
+ // Add syntax highlighting
180
+ function highlightJSON() {
181
+ const content = document.getElementById('json-content');
182
+ let html = content.innerHTML;
183
+
184
+ // Highlight different JSON elements
185
+ html = html.replace(/"([^"]+)":/g, '<span class="json-key">"$1":</span>');
186
+ html = html.replace(/: "([^"]*)"/g, ': <span class="json-string">"$1"</span>');
187
+ html = html.replace(/: (-?\d+\.?\d*)/g, ': <span class="json-number">$1</span>');
188
+ html = html.replace(/: (true|false)/g, ': <span class="json-boolean">$1</span>');
189
+ html = html.replace(/: null/g, ': <span class="json-null">null</span>');
190
+
191
+ content.innerHTML = html;
192
+ }
193
+
194
+ // Apply syntax highlighting after page load
195
+ window.addEventListener('load', highlightJSON);
196
+ </script>
197
+ </body>
198
+ </html>