privateuserh commited on
Commit
b97984e
·
verified ·
1 Parent(s): b2d3c0b

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +345 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Privholochp1cbr
3
- emoji: 🌍
4
- colorFrom: gray
5
- colorTo: green
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: privholochp1cbr
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: red
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,345 @@
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>VRML Data Visualization with CBR Pixels</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
9
+ <script src="https://cdn.jsdelivr.net/npm/vanta@0.5.21/dist/vanta.net.min.js"></script>
10
+ <style>
11
+ body {
12
+ margin: 0;
13
+ overflow: hidden;
14
+ font-family: 'Courier New', monospace;
15
+ }
16
+ #vrml-container {
17
+ position: absolute;
18
+ width: 100%;
19
+ height: 100%;
20
+ }
21
+ .data-block {
22
+ position: absolute;
23
+ background: rgba(30, 30, 30, 0.7);
24
+ border: 1px solid rgba(100, 255, 255, 0.5);
25
+ border-radius: 4px;
26
+ padding: 10px;
27
+ color: #66ffcc;
28
+ font-size: 12px;
29
+ pointer-events: none;
30
+ transform: translateZ(0);
31
+ }
32
+ .pixel-cluster {
33
+ position: absolute;
34
+ display: flex;
35
+ flex-wrap: wrap;
36
+ width: 80px;
37
+ height: 80px;
38
+ pointer-events: none;
39
+ }
40
+ .pixel {
41
+ width: 8px;
42
+ height: 8px;
43
+ margin: 1px;
44
+ background: #4aff9d;
45
+ opacity: 0.8;
46
+ transition: all 0.3s ease;
47
+ }
48
+ .pixel:hover {
49
+ transform: scale(1.5);
50
+ opacity: 1;
51
+ background: #ff4a9d;
52
+ }
53
+ .search-btn {
54
+ position: fixed;
55
+ bottom: 30px;
56
+ right: 30px;
57
+ width: 60px;
58
+ height: 60px;
59
+ border-radius: 50%;
60
+ background: linear-gradient(135deg, #4aff9d, #4a9dff);
61
+ color: white;
62
+ display: flex;
63
+ align-items: center;
64
+ justify-content: center;
65
+ cursor: pointer;
66
+ box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
67
+ z-index: 1000;
68
+ transition: all 0.3s ease;
69
+ }
70
+ .search-btn:hover {
71
+ transform: scale(1.1) rotate(15deg);
72
+ box-shadow: 0 6px 25px rgba(0, 0, 0, 0.4);
73
+ }
74
+ .search-panel {
75
+ position: fixed;
76
+ bottom: 110px;
77
+ right: 30px;
78
+ width: 300px;
79
+ padding: 20px;
80
+ background: rgba(30, 30, 30, 0.9);
81
+ border-radius: 10px;
82
+ box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
83
+ z-index: 1000;
84
+ transform: translateY(20px);
85
+ opacity: 0;
86
+ pointer-events: none;
87
+ transition: all 0.3s ease;
88
+ }
89
+ .search-panel.active {
90
+ transform: translateY(0);
91
+ opacity: 1;
92
+ pointer-events: all;
93
+ }
94
+ .search-input {
95
+ width: 100%;
96
+ padding: 10px;
97
+ background: rgba(50, 50, 50, 0.8);
98
+ border: 1px solid #4aff9d;
99
+ border-radius: 5px;
100
+ color: white;
101
+ margin-bottom: 10px;
102
+ }
103
+ .search-results {
104
+ max-height: 300px;
105
+ overflow-y: auto;
106
+ }
107
+ .result-item {
108
+ padding: 8px;
109
+ margin: 5px 0;
110
+ background: rgba(70, 70, 70, 0.5);
111
+ border-radius: 3px;
112
+ cursor: pointer;
113
+ transition: all 0.2s ease;
114
+ }
115
+ .result-item:hover {
116
+ background: rgba(100, 255, 255, 0.2);
117
+ transform: translateX(5px);
118
+ }
119
+ .highlight {
120
+ background-color: rgba(255, 215, 0, 0.3);
121
+ color: #ffd700;
122
+ }
123
+ </style>
124
+ </head>
125
+ <body>
126
+ <div id="vrml-container"></div>
127
+
128
+ <!-- Data Blocks -->
129
+ <div class="data-block" style="top: 20%; left: 15%;">
130
+ <h3 class="text-lg mb-2">Data Block #1</h3>
131
+ <p>VRML Geometry Nodes</p>
132
+ <p>Transform: [x:1.2, y:0.8, z:0.5]</p>
133
+ <div class="pixel-cluster" style="top: 50px; left: 10px;"></div>
134
+ </div>
135
+
136
+ <div class="data-block" style="top: 30%; right: 20%;">
137
+ <h3 class="text-lg mb-2">Data Block #2</h3>
138
+ <p>Pixel Cluster Analysis</p>
139
+ <p>Density: 0.78</p>
140
+ <div class="pixel-cluster" style="top: 50px; left: 10px;"></div>
141
+ </div>
142
+
143
+ <div class="data-block" style="bottom: 25%; left: 25%;">
144
+ <h3 class="text-lg mb-2">Data Block #3</h3>
145
+ <p>CBR Metadata</p>
146
+ <p>Index: 42</p>
147
+ <div class="pixel-cluster" style="top: 50px; left: 10px;"></div>
148
+ </div>
149
+
150
+ <!-- Floating Search Button -->
151
+ <div class="search-btn" id="searchBtn">
152
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
153
+ <circle cx="11" cy="11" r="8"></circle>
154
+ <line x1="21" y1="21" x2="16.65" y2="16.65"></line>
155
+ </svg>
156
+ </div>
157
+
158
+ <!-- Search Panel -->
159
+ <div class="search-panel" id="searchPanel">
160
+ <input type="text" class="search-input" placeholder="Search data blocks..." id="searchInput">
161
+ <div class="search-results" id="searchResults">
162
+ <!-- Results will be populated here -->
163
+ </div>
164
+ </div>
165
+
166
+ <script>
167
+ // Initialize Three.js scene
168
+ const container = document.getElementById('vrml-container');
169
+ const scene = new THREE.Scene();
170
+ const camera = new THREE.PerspectiveCamera(75, window.innerWidth / window.innerHeight, 0.1, 1000);
171
+ const renderer = new THREE.WebGLRenderer({ antialias: true, alpha: true });
172
+
173
+ renderer.setSize(window.innerWidth, window.innerHeight);
174
+ container.appendChild(renderer.domElement);
175
+
176
+ // Add VRML-like geometry
177
+ const geometry = new THREE.BoxGeometry(1, 1, 1);
178
+ const material = new THREE.MeshBasicMaterial({
179
+ color: 0x44ffaa,
180
+ wireframe: true,
181
+ transparent: true,
182
+ opacity: 0.5
183
+ });
184
+
185
+ // Create multiple floating cubes
186
+ const cubes = [];
187
+ for (let i = 0; i < 15; i++) {
188
+ const cube = new THREE.Mesh(geometry, material);
189
+ cube.position.x = Math.random() * 10 - 5;
190
+ cube.position.y = Math.random() * 10 - 5;
191
+ cube.position.z = Math.random() * 10 - 5;
192
+ cube.rotation.x = Math.random() * Math.PI;
193
+ cube.rotation.y = Math.random() * Math.PI;
194
+ scene.add(cube);
195
+ cubes.push(cube);
196
+ }
197
+
198
+ // Add connecting lines between cubes
199
+ const lineMaterial = new THREE.LineBasicMaterial({ color: 0x44aaff, transparent: true, opacity: 0.3 });
200
+ for (let i = 0; i < cubes.length; i++) {
201
+ for (let j = i + 1; j < cubes.length; j++) {
202
+ if (Math.random() > 0.7) {
203
+ const geometry = new THREE.BufferGeometry().setFromPoints([
204
+ cubes[i].position,
205
+ cubes[j].position
206
+ ]);
207
+ const line = new THREE.Line(geometry, lineMaterial);
208
+ scene.add(line);
209
+ }
210
+ }
211
+ }
212
+
213
+ camera.position.z = 15;
214
+
215
+ // Animation loop
216
+ function animate() {
217
+ requestAnimationFrame(animate);
218
+
219
+ cubes.forEach(cube => {
220
+ cube.rotation.x += 0.005;
221
+ cube.rotation.y += 0.007;
222
+ });
223
+
224
+ renderer.render(scene, camera);
225
+ }
226
+ animate();
227
+
228
+ // Handle window resize
229
+ window.addEventListener('resize', () => {
230
+ camera.aspect = window.innerWidth / window.innerHeight;
231
+ camera.updateProjectionMatrix();
232
+ renderer.setSize(window.innerWidth, window.innerHeight);
233
+ });
234
+
235
+ // Create pixel clusters in data blocks
236
+ document.querySelectorAll('.pixel-cluster').forEach(cluster => {
237
+ for (let i = 0; i < 64; i++) {
238
+ const pixel = document.createElement('div');
239
+ pixel.className = 'pixel';
240
+ pixel.style.opacity = Math.random() * 0.5 + 0.3;
241
+ cluster.appendChild(pixel);
242
+ }
243
+ });
244
+
245
+ // Search functionality
246
+ const searchBtn = document.getElementById('searchBtn');
247
+ const searchPanel = document.getElementById('searchPanel');
248
+ const searchInput = document.getElementById('searchInput');
249
+ const searchResults = document.getElementById('searchResults');
250
+
251
+ // Sample data for CBR search
252
+ const dataBlocks = [
253
+ { id: 1, title: "VRML Geometry Nodes", content: "Transform nodes with xyz coordinates and rotation parameters", tags: ["geometry", "nodes", "transform"] },
254
+ { id: 2, title: "Pixel Cluster Analysis", content: "Analysis of pixel clusters within data blocks for CBR", tags: ["pixels", "clusters", "analysis"] },
255
+ { id: 3, title: "CBR Metadata", content: "Content-based retrieval metadata for efficient search", tags: ["cbr", "metadata", "search"] },
256
+ { id: 4, title: "Data Block Transform", content: "Transformation matrix for 3D data visualization", tags: ["transform", "matrix", "3d"] },
257
+ { id: 5, title: "Pixel Density Metrics", content: "Metrics for measuring pixel cluster density in VRML", tags: ["metrics", "density", "pixels"] }
258
+ ];
259
+
260
+ // Toggle search panel
261
+ searchBtn.addEventListener('click', () => {
262
+ searchPanel.classList.toggle('active');
263
+ if (searchPanel.classList.contains('active')) {
264
+ searchInput.focus();
265
+ }
266
+ });
267
+
268
+ // Search function
269
+ searchInput.addEventListener('input', (e) => {
270
+ const query = e.target.value.toLowerCase();
271
+ searchResults.innerHTML = '';
272
+
273
+ if (query.length < 2) return;
274
+
275
+ const results = dataBlocks.filter(block =>
276
+ block.title.toLowerCase().includes(query) ||
277
+ block.content.toLowerCase().includes(query) ||
278
+ block.tags.some(tag => tag.includes(query))
279
+ );
280
+
281
+ if (results.length === 0) {
282
+ searchResults.innerHTML = '<div class="result-item">No results found</div>';
283
+ return;
284
+ }
285
+
286
+ results.forEach(block => {
287
+ const resultItem = document.createElement('div');
288
+ resultItem.className = 'result-item';
289
+
290
+ // Highlight matching text
291
+ let title = block.title;
292
+ let content = block.content.substring(0, 60) + '...';
293
+
294
+ // Highlight matches in title
295
+ const titleMatchIndex = title.toLowerCase().indexOf(query);
296
+ if (titleMatchIndex >= 0) {
297
+ const before = title.substring(0, titleMatchIndex);
298
+ const match = title.substring(titleMatchIndex, titleMatchIndex + query.length);
299
+ const after = title.substring(titleMatchIndex + query.length);
300
+ title = `${before}<span class="highlight">${match}</span>${after}`;
301
+ }
302
+
303
+ // Highlight matches in content
304
+ const contentMatchIndex = content.toLowerCase().indexOf(query);
305
+ if (contentMatchIndex >= 0) {
306
+ const before = content.substring(0, contentMatchIndex);
307
+ const match = content.substring(contentMatchIndex, contentMatchIndex + query.length);
308
+ const after = content.substring(contentMatchIndex + query.length);
309
+ content = `${before}<span class="highlight">${match}</span>${after}`;
310
+ }
311
+
312
+ resultItem.innerHTML = `
313
+ <div class="font-bold">${title}</div>
314
+ <div class="text-sm opacity-80">${content}</div>
315
+ <div class="text-xs mt-1">Tags: ${block.tags.join(', ')}</div>
316
+ `;
317
+
318
+ resultItem.addEventListener('click', () => {
319
+ // In a real app, this would navigate to the data block
320
+ alert(`Navigating to: ${block.title}`);
321
+ });
322
+
323
+ searchResults.appendChild(resultItem);
324
+ });
325
+ });
326
+
327
+ // Initialize Vanta.js background
328
+ VANTA.NET({
329
+ el: "#vrml-container",
330
+ mouseControls: true,
331
+ touchControls: true,
332
+ gyroControls: false,
333
+ minHeight: 200.00,
334
+ minWidth: 200.00,
335
+ scale: 1.00,
336
+ scaleMobile: 1.00,
337
+ color: 0x44aaff,
338
+ backgroundColor: 0x111122,
339
+ points: 10.00,
340
+ maxDistance: 20.00,
341
+ spacing: 15.00
342
+ });
343
+ </script>
344
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privholochp1cbr" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
345
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Create a working model site in VRML geometry create pixel clusters within data blocks a floating button as a search function Content-Based Retrieval (CBR) Pixels: Integrates CBR pixels within data blocks, enabling efficient search capabilities based on data content, improving retrieval times.