stevhliu HF Staff commited on
Commit
58f1f3f
·
verified ·
1 Parent(s): 47d923c

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +344 -19
  3. prompts.txt +0 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Model Resources
3
- emoji: 🐢
4
- colorFrom: gray
5
- colorTo: red
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: model-resources
3
+ emoji: 🐳
4
+ colorFrom: red
5
+ colorTo: pink
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,344 @@
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>Transformer Models Search</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ body {
11
+ display: flex;
12
+ flex-direction: column;
13
+ min-height: 100vh;
14
+ background-color: #000000;
15
+ }
16
+ .search-container {
17
+ width: 100%;
18
+ max-width: 800px;
19
+ padding: 0 20px;
20
+ margin: auto;
21
+ }
22
+ .results-container {
23
+ width: 100%;
24
+ max-width: 1200px;
25
+ padding: 20px;
26
+ display: none;
27
+ margin: 0 auto;
28
+ }
29
+ .model-card {
30
+ transition: all 0.2s ease;
31
+ }
32
+ .model-card:hover {
33
+ transform: translateY(-2px);
34
+ box-shadow: 0 10px 15px -3px rgba(255, 255, 255, 0.1);
35
+ }
36
+ .search-wrapper {
37
+ position: relative;
38
+ width: 100%;
39
+ margin: 0 auto;
40
+ }
41
+ .search-input {
42
+ width: 100%;
43
+ padding: 1rem 1.5rem;
44
+ border-radius: 9999px;
45
+ background-color: rgba(0, 0, 0, 0.8);
46
+ border: 1px solid rgba(255, 255, 255, 0.2);
47
+ box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.05);
48
+ transition: all 0.3s ease;
49
+ font-size: 1rem;
50
+ position: relative;
51
+ z-index: 2;
52
+ color: white;
53
+ }
54
+ .search-input:focus {
55
+ outline: none;
56
+ border-color: rgba(124, 58, 237, 0.5);
57
+ }
58
+ .search-input::placeholder {
59
+ color: rgba(255, 255, 255, 0.5);
60
+ }
61
+ .search-button {
62
+ position: absolute;
63
+ right: 1rem;
64
+ top: 50%;
65
+ transform: translateY(-50%);
66
+ background: transparent;
67
+ border: none;
68
+ color: white;
69
+ cursor: pointer;
70
+ transition: all 0.2s ease;
71
+ z-index: 3;
72
+ }
73
+ .search-button:hover {
74
+ color: #aaa;
75
+ }
76
+ .glow-effect {
77
+ position: absolute;
78
+ top: -2px;
79
+ left: -2px;
80
+ right: -2px;
81
+ bottom: -2px;
82
+ background: linear-gradient(
83
+ 90deg,
84
+ rgba(255, 0, 0, 0.8) 0%,
85
+ rgba(255, 165, 0, 0.8) 20%,
86
+ rgba(255, 255, 0, 0.8) 40%,
87
+ rgba(0, 128, 0, 0.8) 60%,
88
+ rgba(0, 0, 255, 0.8) 80%,
89
+ rgba(128, 0, 128, 0.8) 100%
90
+ );
91
+ border-radius: 9999px;
92
+ z-index: 1;
93
+ opacity: 0;
94
+ transition: opacity 0.3s ease;
95
+ filter: blur(8px);
96
+ animation: rainbow-glow 6s linear infinite;
97
+ background-size: 400% 400%;
98
+ }
99
+ .search-wrapper:hover .glow-effect,
100
+ .search-input:focus ~ .glow-effect {
101
+ opacity: 0.8;
102
+ }
103
+ @keyframes rainbow-glow {
104
+ 0% {
105
+ background-position: 0% 50%;
106
+ box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
107
+ }
108
+ 16.6% {
109
+ background-position: 20% 50%;
110
+ box-shadow: 0 0 15px rgba(255, 165, 0, 0.5);
111
+ }
112
+ 33.3% {
113
+ background-position: 40% 50%;
114
+ box-shadow: 0 0 15px rgba(255, 255, 0, 0.5);
115
+ }
116
+ 50% {
117
+ background-position: 60% 50%;
118
+ box-shadow: 0 0 15px rgba(0, 128, 0, 0.5);
119
+ }
120
+ 66.6% {
121
+ background-position: 80% 50%;
122
+ box-shadow: 0 0 15px rgba(0, 0, 255, 0.5);
123
+ }
124
+ 83.3% {
125
+ background-position: 100% 50%;
126
+ box-shadow: 0 0 15px rgba(128, 0, 128, 0.5);
127
+ }
128
+ 100% {
129
+ background-position: 0% 50%;
130
+ box-shadow: 0 0 15px rgba(255, 0, 0, 0.5);
131
+ }
132
+ }
133
+ </style>
134
+ </head>
135
+ <body>
136
+ <div class="search-container">
137
+ <div class="flex flex-col items-center">
138
+ <h1 class="text-3xl font-bold text-white mb-8">Transformer Models Search</h1>
139
+ <div class="search-wrapper w-full mb-8">
140
+ <div class="glow-effect"></div>
141
+ <input type="text" id="searchInput"
142
+ class="search-input"
143
+ placeholder="Search for a model (e.g. GPT-4, BERT, ViT)...">
144
+ <button id="searchButton" class="search-button">
145
+ <i class="fas fa-search text-xl"></i>
146
+ </button>
147
+ </div>
148
+ <p class="text-gray-400 text-sm">Try searching for GPT-4, BERT, or ViT to see available resources</p>
149
+ </div>
150
+ </div>
151
+
152
+ <div id="resultsContainer" class="results-container">
153
+ <div class="flex justify-between items-center mb-6">
154
+ <h2 id="resultsTitle" class="text-2xl font-semibold text-white">Search Results for <span class="font-normal" id="searchTermDisplay"></span></h2>
155
+ <button id="backButton" class="flex items-center text-gray-400 hover:text-white">
156
+ <i class="fas fa-arrow-left mr-2"></i> Back to Search
157
+ </button>
158
+ </div>
159
+
160
+ <div id="modelResources" class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
161
+ <!-- Model resources will be inserted here by JavaScript -->
162
+ </div>
163
+ </div>
164
+
165
+ <script>
166
+ // Sample model data
167
+ const modelDatabase = {
168
+ "gpt-4": [
169
+ {
170
+ title: "GPT-4 Technical Report",
171
+ type: "paper",
172
+ url: "https://arxiv.org/abs/2303.08774",
173
+ description: "Official technical report from OpenAI detailing GPT-4's architecture and capabilities."
174
+ },
175
+ {
176
+ title: "OpenAI API Documentation",
177
+ type: "docs",
178
+ url: "https://platform.openai.com/docs/models/gpt-4",
179
+ description: "Official API documentation for accessing GPT-4 through OpenAI's platform."
180
+ },
181
+ {
182
+ title: "GitHub Implementation",
183
+ type: "code",
184
+ url: "https://github.com/openai/gpt-4",
185
+ description: "Community implementations and tools for working with GPT-4."
186
+ }
187
+ ],
188
+ "bert": [
189
+ {
190
+ title: "BERT: Pre-training of Deep Bidirectional Transformers",
191
+ type: "paper",
192
+ url: "https://arxiv.org/abs/1810.04805",
193
+ description: "Original BERT paper from Google Research."
194
+ },
195
+ {
196
+ title: "HuggingFace Transformers",
197
+ type: "code",
198
+ url: "https://huggingface.co/docs/transformers/model_doc/bert",
199
+ description: "Implementation and fine-tuning guide for BERT models."
200
+ },
201
+ {
202
+ title: "BERT Explained",
203
+ type: "tutorial",
204
+ url: "https://jalammar.github.io/illustrated-bert/",
205
+ description: "Visual guide to understanding how BERT works."
206
+ },
207
+ {
208
+ title: "TensorFlow BERT Tutorial",
209
+ type: "tutorial",
210
+ url: "https://www.tensorflow.org/text/tutorials/classify_text_with_bert",
211
+ description: "Official TensorFlow tutorial for text classification with BERT."
212
+ }
213
+ ],
214
+ "vit": [
215
+ {
216
+ title: "An Image is Worth 16x16 Words",
217
+ type: "paper",
218
+ url: "https://arxiv.org/abs/2010.11929",
219
+ description: "Original Vision Transformer (ViT) paper from Google Research."
220
+ },
221
+ {
222
+ title: "PyTorch Implementation",
223
+ type: "code",
224
+ url: "https://github.com/lucidrains/vit-pytorch",
225
+ description: "Popular PyTorch implementation of Vision Transformer."
226
+ },
227
+ {
228
+ title: "ViT Explained",
229
+ type: "tutorial",
230
+ url: "https://towardsdatascience.com/vision-transformers-from-scratch-pytorch-a-step-by-step-guide-96c3313c2e0c",
231
+ description: "Step-by-step guide to understanding and implementing ViT."
232
+ }
233
+ ]
234
+ };
235
+
236
+ // DOM elements
237
+ const searchInput = document.getElementById('searchInput');
238
+ const searchButton = document.getElementById('searchButton');
239
+ const resultsContainer = document.getElementById('resultsContainer');
240
+ const modelResources = document.getElementById('modelResources');
241
+ const searchTermDisplay = document.getElementById('searchTermDisplay');
242
+ const backButton = document.getElementById('backButton');
243
+
244
+ // Search function
245
+ function performSearch() {
246
+ const searchTerm = searchInput.value.trim().toLowerCase();
247
+
248
+ if (searchTerm) {
249
+ // Display search term
250
+ searchTermDisplay.textContent = `"${searchTerm}"`;
251
+
252
+ // Clear previous results
253
+ modelResources.innerHTML = '';
254
+
255
+ // Check if we have resources for this model
256
+ if (modelDatabase[searchTerm]) {
257
+ // Add resources to the page
258
+ modelDatabase[searchTerm].forEach(resource => {
259
+ const card = createResourceCard(resource);
260
+ modelResources.appendChild(card);
261
+ });
262
+ } else {
263
+ // Show "no results" message
264
+ modelResources.innerHTML = `
265
+ <div class="col-span-full text-center py-10">
266
+ <i class="fas fa-search text-4xl text-gray-600 mb-4"></i>
267
+ <h3 class="text-xl font-medium text-gray-400">No resources found for "${searchTerm}"</h3>
268
+ <p class="text-gray-500 mt-2">Try searching for GPT-4, BERT, or ViT</p>
269
+ </div>
270
+ `;
271
+ }
272
+
273
+ // Show results container
274
+ resultsContainer.style.display = 'block';
275
+ searchInput.value = '';
276
+ }
277
+ }
278
+
279
+ // Create resource card element
280
+ function createResourceCard(resource) {
281
+ const card = document.createElement('div');
282
+ card.className = 'model-card bg-gray-900 rounded-xl border border-gray-800 overflow-hidden shadow-sm hover:shadow-md';
283
+
284
+ // Determine icon based on resource type
285
+ let icon, color;
286
+ switch(resource.type) {
287
+ case 'paper':
288
+ icon = 'file-alt';
289
+ color = 'bg-gray-800 text-gray-400';
290
+ break;
291
+ case 'code':
292
+ icon = 'code';
293
+ color = 'bg-gray-800 text-gray-400';
294
+ break;
295
+ case 'docs':
296
+ icon = 'book';
297
+ color = 'bg-gray-800 text-gray-400';
298
+ break;
299
+ case 'tutorial':
300
+ icon = 'graduation-cap';
301
+ color = 'bg-gray-800 text-gray-400';
302
+ break;
303
+ default:
304
+ icon = 'link';
305
+ color = 'bg-gray-800 text-gray-400';
306
+ }
307
+
308
+ card.innerHTML = `
309
+ <a href="${resource.url}" target="_blank" class="block h-full">
310
+ <div class="p-6">
311
+ <div class="flex items-center mb-4">
312
+ <div class="w-10 h-10 rounded-full ${color} flex items-center justify-center mr-3">
313
+ <i class="fas fa-${icon}"></i>
314
+ </div>
315
+ <h3 class="text-lg font-medium text-white">${resource.title}</h3>
316
+ </div>
317
+ <p class="text-gray-400">${resource.description}</p>
318
+ <div class="mt-4 flex items-center text-sm text-gray-400 hover:text-white">
319
+ <span>View ${resource.type}</span>
320
+ <i class="fas fa-arrow-right ml-2"></i>
321
+ </div>
322
+ </div>
323
+ </a>
324
+ `;
325
+
326
+ return card;
327
+ }
328
+
329
+ // Event listeners
330
+ searchButton.addEventListener('click', performSearch);
331
+
332
+ searchInput.addEventListener('keypress', function(e) {
333
+ if (e.key === 'Enter') {
334
+ performSearch();
335
+ }
336
+ });
337
+
338
+ backButton.addEventListener('click', function() {
339
+ resultsContainer.style.display = 'none';
340
+ searchInput.focus();
341
+ });
342
+ </script>
343
+ <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=stevhliu/model-resources" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
344
+ </html>
prompts.txt ADDED
File without changes