openfree commited on
Commit
e7dbc33
ยท
verified ยท
1 Parent(s): 6689cf4

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +187 -49
index.html CHANGED
@@ -307,8 +307,21 @@
307
  </div>
308
 
309
  <div class="note">
310
- โš ๏ธ CORS ์ •์ฑ…์œผ๋กœ ์ธํ•ด ์ผ๋ถ€ ๋ฐ์ดํ„ฐ๊ฐ€ ๋กœ๋“œ๋˜์ง€ ์•Š์„ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
311
- ํ”„๋ก์‹œ ์„œ๋ฒ„๋‚˜ ๋ฐฑ์—”๋“œ API๋ฅผ ์‚ฌ์šฉํ•˜๋ฉด ๋ชจ๋“  ๋ฐ์ดํ„ฐ๋ฅผ ๊ฐ€์ ธ์˜ฌ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.
 
 
 
 
 
 
 
 
 
 
 
 
 
312
  </div>
313
  </div>
314
 
@@ -358,17 +371,34 @@
358
  container.innerHTML = '<div class="loading"><div class="loading-spinner"></div><p>๋ชจ๋ธ ๋กœ๋”ฉ ์ค‘...</p></div>';
359
 
360
  try {
361
- // HuggingFace API ์‚ฌ์šฉ
362
- const sort = filter === 'trending' ? 'likes' : 'created';
363
- const response = await fetch(`https://huggingface.co/api/models?sort=${sort}&limit=20`);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
364
 
365
  if (!response.ok) throw new Error('API ์š”์ฒญ ์‹คํŒจ');
366
 
367
  const data = await response.json();
 
368
  displayHFModels(data, container);
369
  } catch (error) {
370
- // CORS ์—๋Ÿฌ ์‹œ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ
371
- displaySampleHFModels(filter, container);
 
 
372
  }
373
  }
374
 
@@ -387,39 +417,102 @@
387
 
388
  try {
389
  // HuggingFace API ์‚ฌ์šฉ
390
- const sort = filter === 'trending' ? 'likes' : 'created';
391
- const response = await fetch(`https://huggingface.co/api/spaces?sort=${sort}&limit=20`);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
392
 
393
  if (!response.ok) throw new Error('API ์š”์ฒญ ์‹คํŒจ');
394
 
395
  const data = await response.json();
 
396
  displayHFSpaces(data, container);
397
  } catch (error) {
398
- // CORS ์—๋Ÿฌ ์‹œ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ
399
- displaySampleHFSpaces(filter, container);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
400
  }
401
  }
402
 
403
  // Replicate ๋ชจ๋ธ ๋กœ๋“œ
404
  async function loadReplicate() {
 
405
  const container = document.getElementById('replicate-content');
406
  container.innerHTML = '<div class="loading"><div class="loading-spinner"></div><p>๋ชจ๋ธ ๋กœ๋”ฉ ์ค‘...</p></div>';
407
 
408
  // Replicate๋Š” ๊ณต๊ฐœ API๊ฐ€ ์ œํ•œ์ ์ด๋ฏ€๋กœ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ
 
409
  displaySampleReplicateModels(container);
410
  }
411
 
412
  // HuggingFace Models ํ‘œ์‹œ
413
  function displayHFModels(models, container) {
414
  container.innerHTML = '';
415
- models.forEach(model => {
416
  const card = createModelCard({
417
- title: model.modelId || model.id,
418
- author: model.author || 'Unknown',
 
419
  likes: model.likes || 0,
420
  downloads: model.downloads || 0,
421
- url: `https://huggingface.co/${model.modelId || model.id}`,
422
- icon: '๐Ÿค–'
 
 
 
423
  });
424
  container.appendChild(card);
425
  });
@@ -428,14 +521,18 @@
428
  // HuggingFace Spaces ํ‘œ์‹œ
429
  function displayHFSpaces(spaces, container) {
430
  container.innerHTML = '';
431
- spaces.forEach(space => {
432
  const card = createModelCard({
433
- title: space.id.split('/')[1] || space.id,
434
- author: space.id.split('/')[0] || 'Unknown',
 
435
  likes: space.likes || 0,
436
  sdk: space.sdk || 'Unknown',
 
437
  url: `https://huggingface.co/spaces/${space.id}`,
438
- icon: '๐ŸŽฏ'
 
 
439
  });
440
  container.appendChild(card);
441
  });
@@ -447,7 +544,17 @@
447
  card.className = 'item-card';
448
  card.onclick = () => window.open(data.url, '_blank');
449
 
 
 
 
 
 
 
 
450
  card.innerHTML = `
 
 
 
451
  <div class="item-header">
452
  <div class="item-icon">${data.icon}</div>
453
  <div class="item-info">
@@ -459,8 +566,15 @@
459
  ${data.likes !== undefined ? `<div class="stat">โค๏ธ ${formatNumber(data.likes)}</div>` : ''}
460
  ${data.downloads !== undefined ? `<div class="stat">โฌ‡๏ธ ${formatNumber(data.downloads)}</div>` : ''}
461
  ${data.sdk ? `<div class="stat">๐Ÿ› ๏ธ ${data.sdk}</div>` : ''}
 
 
462
  ${data.runs !== undefined ? `<div class="stat">โ–ถ๏ธ ${formatNumber(data.runs)}</div>` : ''}
463
  </div>
 
 
 
 
 
464
  `;
465
 
466
  return card;
@@ -475,18 +589,24 @@
475
 
476
  // ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ ํ•จ์ˆ˜๋“ค
477
  function displaySampleHFModels(filter, container) {
 
478
  const sampleData = filter === 'trending' ? [
479
- { title: 'meta-llama/Llama-3.3-70B', author: 'meta-llama', likes: 177000, downloads: 1150000, icon: '๐Ÿค–' },
480
- { title: 'DeepSeek-R1', author: 'deepseek-ai', likes: 10400, downloads: 567000, icon: '๐Ÿค–' },
481
- { title: 'Qwen/Qwen3-235B', author: 'Qwen', likes: 5370, downloads: 225000, icon: '๐Ÿค–' },
482
- { title: 'FLUX.1-dev', author: 'black-forest-labs', likes: 29100, downloads: 397000, icon: '๐Ÿค–' },
483
- { title: 'microsoft/Phi-4', author: 'microsoft', likes: 8900, downloads: 156000, icon: '๐Ÿค–' }
 
 
 
 
 
484
  ] : [
485
- { title: 'OmniGen2', author: 'research-lab', likes: 156, downloads: 890, icon: '๐Ÿค–' },
486
- { title: 'VideoGen-Pro', author: 'ai-startup', likes: 89, downloads: 234, icon: '๐Ÿค–' },
487
- { title: 'CodeLLM-7B', author: 'dev-team', likes: 234, downloads: 1200, icon: '๐Ÿค–' },
488
- { title: 'MusicGen-V2', author: 'audio-ai', likes: 67, downloads: 456, icon: '๐Ÿค–' },
489
- { title: 'ImageEdit-XL', author: 'vision-lab', likes: 145, downloads: 789, icon: '๐Ÿค–' }
490
  ];
491
 
492
  container.innerHTML = '';
@@ -497,18 +617,24 @@
497
  }
498
 
499
  function displaySampleHFSpaces(filter, container) {
 
500
  const sampleData = filter === 'trending' ? [
501
- { title: 'stable-diffusion-webui', author: 'stabilityai', likes: 75500, sdk: 'Gradio', icon: '๐ŸŽฏ' },
502
- { title: 'chatgpt-clone', author: 'community', likes: 12300, sdk: 'Streamlit', icon: '๐ŸŽฏ' },
503
- { title: 'image-to-3d', author: 'research', likes: 8590, sdk: 'Gradio', icon: '๐ŸŽฏ' },
504
- { title: 'voice-clone', author: 'audio-ml', likes: 5640, sdk: 'Gradio', icon: '๐ŸŽฏ' },
505
- { title: 'code-generator', author: 'dev-tools', likes: 3210, sdk: 'Streamlit', icon: '๐ŸŽฏ' }
 
 
 
 
 
506
  ] : [
507
- { title: 'new-llm-demo', author: 'researcher', likes: 23, sdk: 'Gradio', icon: '๐ŸŽฏ' },
508
- { title: 'video-editor', author: 'creator', likes: 45, sdk: 'Streamlit', icon: '๐ŸŽฏ' },
509
- { title: 'data-viz', author: 'analyst', likes: 67, sdk: 'Streamlit', icon: '๐ŸŽฏ' },
510
- { title: 'music-mixer', author: 'musician', likes: 34, sdk: 'Gradio', icon: '๐ŸŽฏ' },
511
- { title: 'text-analyzer', author: 'nlp-dev', likes: 56, sdk: 'Gradio', icon: '๐ŸŽฏ' }
512
  ];
513
 
514
  container.innerHTML = '';
@@ -519,15 +645,18 @@
519
  }
520
 
521
  function displaySampleReplicateModels(container) {
 
522
  const sampleData = [
523
- { title: 'FLUX1.1-pro', author: 'black-forest-labs', runs: 2910000, icon: 'โšก' },
524
- { title: 'stable-diffusion-3', author: 'stability-ai', runs: 1750000, icon: 'โšก' },
525
- { title: 'whisper', author: 'openai', runs: 890000, icon: 'โšก' },
526
- { title: 'llama-2-70b', author: 'meta', runs: 670000, icon: 'โšก' },
527
- { title: 'musicgen', author: 'facebook', runs: 450000, icon: 'โšก' },
528
- { title: 'animate-diff', author: 'lucataco', runs: 320000, icon: 'โšก' },
529
- { title: 'real-esrgan', author: 'xinntao', runs: 280000, icon: 'โšก' },
530
- { title: 'rembg', author: 'cjwbw', runs: 210000, icon: 'โšก' }
 
 
531
  ];
532
 
533
  container.innerHTML = '';
@@ -549,7 +678,16 @@
549
  }
550
 
551
  // ์ดˆ๊ธฐ ๋กœ๋“œ
552
- loadHFModels('trending');
 
 
 
 
 
 
 
 
 
553
  </script>
554
  </body>
555
  </html>
 
307
  </div>
308
 
309
  <div class="note">
310
+ โš ๏ธ <strong>API ์‚ฌ์šฉ ์•ˆ๋‚ด:</strong><br>
311
+ โ€ข HuggingFace API: https://huggingface.co/api/models?sort=likes7d (ํŠธ๋ Œ๋”ฉ), ?sort=created_at (์‹ ๊ทœ)<br>
312
+ โ€ข CORS ์—๋Ÿฌ ๋ฐœ์ƒ ์‹œ ํ”„๋ก์‹œ ์„œ๋ฒ„ ์‚ฌ์šฉ์„ ๊ถŒ์žฅํ•ฉ๋‹ˆ๋‹ค<br>
313
+ โ€ข ์‹ค์ œ ์„œ๋น„์Šค์—์„œ๋Š” ๋ฐฑ์—”๋“œ ์„œ๋ฒ„๋ฅผ ํ†ตํ•ด API๋ฅผ ํ˜ธ์ถœํ•˜๋Š” ๊ฒƒ์ด ์•ˆ์ •์ ์ž…๋‹ˆ๋‹ค
314
+ </div>
315
+
316
+ <!-- API URLs Info -->
317
+ <div style="margin-top: 30px; background: #f8f9fa; padding: 20px; border-radius: 10px;">
318
+ <h3 style="margin-bottom: 15px; color: #333;">๐Ÿ“Œ API Endpoints</h3>
319
+ <div style="display: grid; gap: 10px; font-size: 0.9rem;">
320
+ <div><strong>HF Models (Trending):</strong> <code style="background: #e9ecef; padding: 2px 6px; border-radius: 4px;">https://huggingface.co/api/models?sort=likes7d&direction=-1&limit=30</code></div>
321
+ <div><strong>HF Models (New):</strong> <code style="background: #e9ecef; padding: 2px 6px; border-radius: 4px;">https://huggingface.co/api/models?sort=created_at&direction=-1&limit=30</code></div>
322
+ <div><strong>HF Spaces (Trending):</strong> <code style="background: #e9ecef; padding: 2px 6px; border-radius: 4px;">https://huggingface.co/api/spaces?sort=likes&direction=-1&limit=30</code></div>
323
+ <div><strong>HF Spaces (New):</strong> <code style="background: #e9ecef; padding: 2px 6px; border-radius: 4px;">https://huggingface.co/api/spaces?sort=created_at&direction=-1&limit=30</code></div>
324
+ </div>
325
  </div>
326
  </div>
327
 
 
371
  container.innerHTML = '<div class="loading"><div class="loading-spinner"></div><p>๋ชจ๋ธ ๋กœ๋”ฉ ์ค‘...</p></div>';
372
 
373
  try {
374
+ // HuggingFace API ์‚ฌ์šฉ - trending์€ sort ํŒŒ๋ผ๋ฏธํ„ฐ๋กœ ์ฒ˜๋ฆฌ
375
+ let apiUrl;
376
+ if (filter === 'trending') {
377
+ // trending์€ likes7d (7์ผ๊ฐ„ ์ข‹์•„์š”) ๋˜๋Š” likes๋กœ ์ •๋ ฌ
378
+ apiUrl = 'https://huggingface.co/api/models?sort=likes7d&direction=-1&limit=30';
379
+ } else {
380
+ // ์‹ ๊ทœ๋Š” created_at์œผ๋กœ ์ •๋ ฌ
381
+ apiUrl = 'https://huggingface.co/api/models?sort=created_at&direction=-1&limit=30';
382
+ }
383
+
384
+ console.log(`๐Ÿ“ก API ํ˜ธ์ถœ ์ค‘: ${apiUrl}`);
385
+ const response = await fetch(apiUrl, {
386
+ method: 'GET',
387
+ headers: {
388
+ 'Accept': 'application/json',
389
+ }
390
+ });
391
 
392
  if (!response.ok) throw new Error('API ์š”์ฒญ ์‹คํŒจ');
393
 
394
  const data = await response.json();
395
+ console.log(`โœ… ${data.length}๊ฐœ์˜ ๋ชจ๋ธ ๋กœ๋“œ ์™„๋ฃŒ`);
396
  displayHFModels(data, container);
397
  } catch (error) {
398
+ console.error('โŒ API ์—๋Ÿฌ:', error);
399
+ console.log('๐Ÿ”„ ํ”„๋ก์‹œ ์„œ๋ฒ„๋ฅผ ํ†ตํ•œ ์š”์ฒญ์„ ์‹œ๋„ํ•ฉ๋‹ˆ๋‹ค...');
400
+ // CORS ์—๋Ÿฌ ์‹œ ํ”„๋ก์‹œ ์‚ฌ์šฉ ์‹œ๋„
401
+ tryProxyRequest('models', filter, container);
402
  }
403
  }
404
 
 
417
 
418
  try {
419
  // HuggingFace API ์‚ฌ์šฉ
420
+ let apiUrl;
421
+ if (filter === 'trending') {
422
+ // trending์€ likes๋กœ ์ •๋ ฌ
423
+ apiUrl = 'https://huggingface.co/api/spaces?sort=likes&direction=-1&limit=30';
424
+ } else {
425
+ // ์‹ ๊ทœ๋Š” created_at์œผ๋กœ ์ •๋ ฌ
426
+ apiUrl = 'https://huggingface.co/api/spaces?sort=created_at&direction=-1&limit=30';
427
+ }
428
+
429
+ console.log(`๐Ÿ“ก API ํ˜ธ์ถœ ์ค‘: ${apiUrl}`);
430
+ const response = await fetch(apiUrl, {
431
+ method: 'GET',
432
+ headers: {
433
+ 'Accept': 'application/json',
434
+ }
435
+ });
436
 
437
  if (!response.ok) throw new Error('API ์š”์ฒญ ์‹คํŒจ');
438
 
439
  const data = await response.json();
440
+ console.log(`โœ… ${data.length}๊ฐœ์˜ ์ŠคํŽ˜์ด์Šค ๋กœ๋“œ ์™„๋ฃŒ`);
441
  displayHFSpaces(data, container);
442
  } catch (error) {
443
+ console.error('โŒ API ์—๋Ÿฌ:', error);
444
+ console.log('๐Ÿ”„ ํ”„๋ก์‹œ ์„œ๋ฒ„๋ฅผ ํ†ตํ•œ ์š”์ฒญ์„ ์‹œ๋„ํ•ฉ๋‹ˆ๋‹ค...');
445
+ // CORS ์—๋Ÿฌ ์‹œ ํ”„๋ก์‹œ ์‚ฌ์šฉ ์‹œ๋„
446
+ tryProxyRequest('spaces', filter, container);
447
+ }
448
+ }
449
+
450
+ // ํ”„๋ก์‹œ๋ฅผ ํ†ตํ•œ ์š”์ฒญ ์‹œ๋„
451
+ async function tryProxyRequest(type, filter, container) {
452
+ try {
453
+ console.log('๐Ÿ”„ ํ”„๋ก์‹œ๋ฅผ ํ†ตํ•œ ์š”์ฒญ ์‹œ๋„ ์ค‘...');
454
+ // ๊ณต๊ฐœ CORS ํ”„๋ก์‹œ ์‚ฌ์šฉ (์˜ˆ: cors-anywhere)
455
+ const proxyUrl = 'https://api.allorigins.win/raw?url=';
456
+ let targetUrl;
457
+
458
+ if (type === 'models') {
459
+ targetUrl = filter === 'trending'
460
+ ? 'https://huggingface.co/api/models?sort=likes7d&direction=-1&limit=30'
461
+ : 'https://huggingface.co/api/models?sort=created_at&direction=-1&limit=30';
462
+ } else {
463
+ targetUrl = filter === 'trending'
464
+ ? 'https://huggingface.co/api/spaces?sort=likes&direction=-1&limit=30'
465
+ : 'https://huggingface.co/api/spaces?sort=created_at&direction=-1&limit=30';
466
+ }
467
+
468
+ console.log(`๐Ÿ“ก ํ”„๋ก์‹œ URL: ${proxyUrl + encodeURIComponent(targetUrl)}`);
469
+ const response = await fetch(proxyUrl + encodeURIComponent(targetUrl));
470
+ const data = await response.json();
471
+
472
+ console.log(`โœ… ํ”„๋ก์‹œ๋ฅผ ํ†ตํ•ด ${data.length}๊ฐœ์˜ ๋ฐ์ดํ„ฐ ๋กœ๋“œ ์™„๋ฃŒ`);
473
+ if (type === 'models') {
474
+ displayHFModels(data, container);
475
+ } else {
476
+ displayHFSpaces(data, container);
477
+ }
478
+ } catch (error) {
479
+ console.error('โŒ ํ”„๋ก์‹œ ์š”์ฒญ๋„ ์‹คํŒจ:', error);
480
+ console.log('๐Ÿ“Œ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.');
481
+ // ๋ชจ๋“  ์‹œ๋„ ์‹คํŒจ ์‹œ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ
482
+ if (type === 'models') {
483
+ displaySampleHFModels(filter, container);
484
+ } else {
485
+ displaySampleHFSpaces(filter, container);
486
+ }
487
  }
488
  }
489
 
490
  // Replicate ๋ชจ๋ธ ๋กœ๋“œ
491
  async function loadReplicate() {
492
+ console.log('๐Ÿš€ Replicate ๋ชจ๋ธ ๋กœ๋“œ ์‹œ์ž‘');
493
  const container = document.getElementById('replicate-content');
494
  container.innerHTML = '<div class="loading"><div class="loading-spinner"></div><p>๋ชจ๋ธ ๋กœ๋”ฉ ์ค‘...</p></div>';
495
 
496
  // Replicate๋Š” ๊ณต๊ฐœ API๊ฐ€ ์ œํ•œ์ ์ด๋ฏ€๋กœ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ
497
+ console.log('โ„น๏ธ Replicate๋Š” ๊ณต๊ฐœ API๊ฐ€ ์ œํ•œ์ ์ด๋ฏ€๋กœ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.');
498
  displaySampleReplicateModels(container);
499
  }
500
 
501
  // HuggingFace Models ํ‘œ์‹œ
502
  function displayHFModels(models, container) {
503
  container.innerHTML = '';
504
+ models.forEach((model, index) => {
505
  const card = createModelCard({
506
+ rank: index + 1,
507
+ title: model.id?.split('/')[1] || model.modelId || 'Unknown',
508
+ author: model.id?.split('/')[0] || model.author || 'Unknown',
509
  likes: model.likes || 0,
510
  downloads: model.downloads || 0,
511
+ tags: model.tags || [],
512
+ pipeline_tag: model.pipeline_tag || '',
513
+ url: `https://huggingface.co/${model.id || model.modelId}`,
514
+ icon: '๐Ÿค–',
515
+ updated: model.lastModified || model.created_at
516
  });
517
  container.appendChild(card);
518
  });
 
521
  // HuggingFace Spaces ํ‘œ์‹œ
522
  function displayHFSpaces(spaces, container) {
523
  container.innerHTML = '';
524
+ spaces.forEach((space, index) => {
525
  const card = createModelCard({
526
+ rank: index + 1,
527
+ title: space.id?.split('/')[1] || 'Unknown',
528
+ author: space.id?.split('/')[0] || 'Unknown',
529
  likes: space.likes || 0,
530
  sdk: space.sdk || 'Unknown',
531
+ emoji: space.emoji || '๐ŸŽฏ',
532
  url: `https://huggingface.co/spaces/${space.id}`,
533
+ icon: space.emoji || '๐ŸŽฏ',
534
+ hardware: space.hardware || 'CPU',
535
+ updated: space.lastModified || space.created_at
536
  });
537
  container.appendChild(card);
538
  });
 
544
  card.className = 'item-card';
545
  card.onclick = () => window.open(data.url, '_blank');
546
 
547
+ // ์ˆœ์œ„์— ๋”ฐ๋ฅธ ์ƒ‰์ƒ
548
+ let rankColor = '#999';
549
+ if (data.rank === 1) rankColor = '#FFD700';
550
+ else if (data.rank === 2) rankColor = '#C0C0C0';
551
+ else if (data.rank === 3) rankColor = '#CD7F32';
552
+ else if (data.rank <= 10) rankColor = '#667eea';
553
+
554
  card.innerHTML = `
555
+ <div class="rank-badge" style="position: absolute; top: 10px; right: 10px; background: ${rankColor}; color: white; width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.9rem;">
556
+ ${data.rank}
557
+ </div>
558
  <div class="item-header">
559
  <div class="item-icon">${data.icon}</div>
560
  <div class="item-info">
 
566
  ${data.likes !== undefined ? `<div class="stat">โค๏ธ ${formatNumber(data.likes)}</div>` : ''}
567
  ${data.downloads !== undefined ? `<div class="stat">โฌ‡๏ธ ${formatNumber(data.downloads)}</div>` : ''}
568
  ${data.sdk ? `<div class="stat">๐Ÿ› ๏ธ ${data.sdk}</div>` : ''}
569
+ ${data.hardware ? `<div class="stat">๐Ÿ’ป ${data.hardware}</div>` : ''}
570
+ ${data.pipeline_tag ? `<div class="stat">๐Ÿท๏ธ ${data.pipeline_tag}</div>` : ''}
571
  ${data.runs !== undefined ? `<div class="stat">โ–ถ๏ธ ${formatNumber(data.runs)}</div>` : ''}
572
  </div>
573
+ ${data.tags && data.tags.length > 0 ? `
574
+ <div style="margin-top: 10px; display: flex; flex-wrap: wrap; gap: 5px;">
575
+ ${data.tags.slice(0, 3).map(tag => `<span style="background: #f0f0f0; padding: 2px 8px; border-radius: 12px; font-size: 0.75rem; color: #666;">${tag}</span>`).join('')}
576
+ </div>
577
+ ` : ''}
578
  `;
579
 
580
  return card;
 
589
 
590
  // ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ ํ‘œ์‹œ ํ•จ์ˆ˜๋“ค
591
  function displaySampleHFModels(filter, container) {
592
+ console.log(`๐Ÿ“Œ ${filter === 'trending' ? 'ํŠธ๋ Œ๋”ฉ' : '์‹ ๊ทœ'} ๋ชจ๋ธ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.`);
593
  const sampleData = filter === 'trending' ? [
594
+ { rank: 1, title: 'Llama-3.3-70B-Instruct', author: 'meta-llama', likes: 177000, downloads: 1150000, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['llama', '70b', 'instruct'] },
595
+ { rank: 2, title: 'DeepSeek-R1-Distill-Qwen-32B', author: 'deepseek-ai', likes: 10400, downloads: 567000, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['deepseek', 'reasoning'] },
596
+ { rank: 3, title: 'Qwen3-235B-A22B', author: 'Qwen', likes: 5370, downloads: 225000, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['qwen', 'large'] },
597
+ { rank: 4, title: 'FLUX.1-dev', author: 'black-forest-labs', likes: 29100, downloads: 397000, icon: '๐Ÿค–', pipeline_tag: 'text-to-image', tags: ['flux', 'diffusion'] },
598
+ { rank: 5, title: 'Phi-4', author: 'microsoft', likes: 8900, downloads: 156000, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['phi', 'small'] },
599
+ { rank: 6, title: 'stable-diffusion-3.5-large', author: 'stabilityai', likes: 7650, downloads: 234000, icon: '๐Ÿค–', pipeline_tag: 'text-to-image', tags: ['sd3', 'large'] },
600
+ { rank: 7, title: 'whisper-large-v3-turbo', author: 'openai', likes: 6780, downloads: 189000, icon: '๐Ÿค–', pipeline_tag: 'automatic-speech-recognition', tags: ['whisper', 'asr'] },
601
+ { rank: 8, title: 'MusicGen-Stereo-Melody', author: 'facebook', likes: 5430, downloads: 98000, icon: '๐Ÿค–', pipeline_tag: 'text-to-audio', tags: ['music', 'generation'] },
602
+ { rank: 9, title: 'Florence-2-large', author: 'microsoft', likes: 4890, downloads: 87000, icon: '๐Ÿค–', pipeline_tag: 'image-text-to-text', tags: ['vision', 'florence'] },
603
+ { rank: 10, title: 'QwQ-32B-Preview', author: 'Qwen', likes: 4560, downloads: 76000, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['reasoning', 'cot'] }
604
  ] : [
605
+ { rank: 1, title: 'OmniGen2', author: 'BAAI', likes: 156, downloads: 890, icon: '๐Ÿค–', pipeline_tag: 'image-generation', tags: ['new', 'omnigen'] },
606
+ { rank: 2, title: 'VideoGen-Pro-2B', author: 'ai-lab', likes: 89, downloads: 234, icon: '๐Ÿค–', pipeline_tag: 'text-to-video', tags: ['video', 'new'] },
607
+ { rank: 3, title: 'CodeLLM-7B-Python', author: 'code-ai', likes: 234, downloads: 1200, icon: '๐Ÿค–', pipeline_tag: 'text-generation', tags: ['code', 'python'] },
608
+ { rank: 4, title: 'MusicGen-Remix', author: 'audio-ml', likes: 67, downloads: 456, icon: '๐Ÿค–', pipeline_tag: 'audio-to-audio', tags: ['music', 'remix'] },
609
+ { rank: 5, title: 'ImageEdit-XL-v2', author: 'vision-lab', likes: 145, downloads: 789, icon: '๐Ÿค–', pipeline_tag: 'image-to-image', tags: ['editing', 'xl'] }
610
  ];
611
 
612
  container.innerHTML = '';
 
617
  }
618
 
619
  function displaySampleHFSpaces(filter, container) {
620
+ console.log(`๐Ÿ“Œ ${filter === 'trending' ? 'ํŠธ๋ Œ๋”ฉ' : '์‹ ๊ทœ'} ์ŠคํŽ˜์ด์Šค ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.`);
621
  const sampleData = filter === 'trending' ? [
622
+ { rank: 1, title: 'stable-diffusion-webui', author: 'stabilityai', likes: 75500, sdk: 'Gradio', icon: '๐ŸŽจ', hardware: 'T4 GPU' },
623
+ { rank: 2, title: 'chatgpt-clone', author: 'community', likes: 12300, sdk: 'Streamlit', icon: '๐Ÿ’ฌ', hardware: 'CPU' },
624
+ { rank: 3, title: 'InstantID', author: 'InstantX', likes: 8590, sdk: 'Gradio', icon: '๐Ÿ‘ค', hardware: 'A10G' },
625
+ { rank: 4, title: 'voice-clone-xtts', author: 'coqui', likes: 5640, sdk: 'Gradio', icon: '๐ŸŽค', hardware: 'T4 GPU' },
626
+ { rank: 5, title: 'code-llama-playground', author: 'meta', likes: 3210, sdk: 'Gradio', icon: '๐Ÿ’ป', hardware: 'A100' },
627
+ { rank: 6, title: 'image-to-3d-model', author: '3d-ai', likes: 2890, sdk: 'Gradio', icon: '๐ŸŽฒ', hardware: 'A10G' },
628
+ { rank: 7, title: 'music-visualizer', author: 'audio-viz', likes: 2340, sdk: 'Streamlit', icon: '๐ŸŽต', hardware: 'CPU' },
629
+ { rank: 8, title: 'pdf-chatbot', author: 'doc-ai', likes: 1980, sdk: 'Gradio', icon: '๐Ÿ“„', hardware: 'T4 GPU' },
630
+ { rank: 9, title: 'anime-art-generator', author: 'waifu-ai', likes: 1670, sdk: 'Gradio', icon: '๐ŸŽŒ', hardware: 'T4 GPU' },
631
+ { rank: 10, title: 'dataset-explorer', author: 'data-tools', likes: 1450, sdk: 'Streamlit', icon: '๐Ÿ“Š', hardware: 'CPU' }
632
  ] : [
633
+ { rank: 1, title: 'llm-arena', author: 'benchmark', likes: 23, sdk: 'Gradio', icon: '๐Ÿ†', hardware: 'A100' },
634
+ { rank: 2, title: 'video-editor-ai', author: 'creator-tools', likes: 45, sdk: 'Streamlit', icon: '๐ŸŽฌ', hardware: 'T4 GPU' },
635
+ { rank: 3, title: 'data-viz-dashboard', author: 'analytics', likes: 67, sdk: 'Streamlit', icon: '๐Ÿ“ˆ', hardware: 'CPU' },
636
+ { rank: 4, title: 'music-mixer-ai', author: 'dj-ai', likes: 34, sdk: 'Gradio', icon: '๐ŸŽง', hardware: 'CPU' },
637
+ { rank: 5, title: 'text-analyzer-pro', author: 'nlp-tools', likes: 56, sdk: 'Gradio', icon: '๐Ÿ“', hardware: 'CPU' }
638
  ];
639
 
640
  container.innerHTML = '';
 
645
  }
646
 
647
  function displaySampleReplicateModels(container) {
648
+ console.log('๐Ÿ“Œ Replicate ์ธ๊ธฐ ๋ชจ๋ธ ์ƒ˜ํ”Œ ๋ฐ์ดํ„ฐ๋ฅผ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.');
649
  const sampleData = [
650
+ { rank: 1, title: 'flux-1.1-pro', author: 'black-forest-labs', runs: 2910000, icon: '๐ŸŽจ' },
651
+ { rank: 2, title: 'stable-diffusion-3', author: 'stability-ai', runs: 1750000, icon: '๐Ÿ–ผ๏ธ' },
652
+ { rank: 3, title: 'whisper-large-v3', author: 'openai', runs: 890000, icon: '๐ŸŽค' },
653
+ { rank: 4, title: 'llama-3.3-70b', author: 'meta', runs: 670000, icon: '๐Ÿค–' },
654
+ { rank: 5, title: 'musicgen-melody', author: 'facebook', runs: 450000, icon: '๐ŸŽต' },
655
+ { rank: 6, title: 'animate-diff', author: 'lucataco', runs: 320000, icon: '๐ŸŽฌ' },
656
+ { rank: 7, title: 'real-esrgan', author: 'xinntao', runs: 280000, icon: '๐Ÿ”' },
657
+ { rank: 8, title: 'rembg', author: 'cjwbw', runs: 210000, icon: 'โœ‚๏ธ' },
658
+ { rank: 9, title: 'gfpgan', author: 'tencentarc', runs: 178000, icon: '๐Ÿ‘ค' },
659
+ { rank: 10, title: 'codeformer', author: 'sczhou', runs: 156000, icon: 'โœจ' }
660
  ];
661
 
662
  container.innerHTML = '';
 
678
  }
679
 
680
  // ์ดˆ๊ธฐ ๋กœ๋“œ
681
+ window.addEventListener('DOMContentLoaded', () => {
682
+ console.log('๐Ÿš€ HuggingFace & Replicate ํŠธ๋ Œ๋”ฉ ๋ฆฌ์ŠคํŠธ ๋กœ๋“œ ์‹œ์ž‘');
683
+ console.log('๐Ÿ“Œ API Endpoints:');
684
+ console.log('- HF Models (Trending): https://huggingface.co/api/models?sort=likes7d&direction=-1&limit=30');
685
+ console.log('- HF Models (New): https://huggingface.co/api/models?sort=created_at&direction=-1&limit=30');
686
+ console.log('- HF Spaces (Trending): https://huggingface.co/api/spaces?sort=likes&direction=-1&limit=30');
687
+ console.log('- HF Spaces (New): https://huggingface.co/api/spaces?sort=created_at&direction=-1&limit=30');
688
+
689
+ loadHFModels('trending');
690
+ });
691
  </script>
692
  </body>
693
  </html>