Update index.html
Browse files- index.html +36 -26
index.html
CHANGED
|
@@ -505,6 +505,7 @@
|
|
| 505 |
<option value="image-text-to-text">Vision-Language</option>
|
| 506 |
</select>
|
| 507 |
<select class="filter-select" id="models-sort-filter">
|
|
|
|
| 508 |
<option value="likes">Most Liked</option>
|
| 509 |
<option value="downloads">Most Downloaded</option>
|
| 510 |
<option value="recent">Recently Added</option>
|
|
@@ -539,6 +540,7 @@
|
|
| 539 |
<option value="docker">Docker</option>
|
| 540 |
</select>
|
| 541 |
<select class="filter-select" id="spaces-sort-filter">
|
|
|
|
| 542 |
<option value="likes">Most Liked</option>
|
| 543 |
<option value="recent">Recently Added</option>
|
| 544 |
</select>
|
|
@@ -754,6 +756,7 @@
|
|
| 754 |
|
| 755 |
return {
|
| 756 |
rank: index + 1,
|
|
|
|
| 757 |
title: modelName,
|
| 758 |
author: author,
|
| 759 |
url: url,
|
|
@@ -807,6 +810,7 @@
|
|
| 807 |
|
| 808 |
return {
|
| 809 |
rank: index + 1,
|
|
|
|
| 810 |
title: model.id?.split('/')[1] || model.modelId || 'Unknown',
|
| 811 |
author: model.id?.split('/')[0] || model.author || 'Unknown',
|
| 812 |
likes: model.likes || 0,
|
|
@@ -840,6 +844,7 @@
|
|
| 840 |
|
| 841 |
return {
|
| 842 |
rank: index + 1,
|
|
|
|
| 843 |
title: space.id?.split('/')[1] || 'Unknown',
|
| 844 |
author: space.id?.split('/')[0] || 'Unknown',
|
| 845 |
likes: space.likes || 0,
|
|
@@ -864,10 +869,12 @@
|
|
| 864 |
card.onclick = () => window.open(data.url, '_blank');
|
| 865 |
|
| 866 |
let rankColor = '#999';
|
| 867 |
-
|
| 868 |
-
|
| 869 |
-
|
| 870 |
-
else if (
|
|
|
|
|
|
|
| 871 |
|
| 872 |
card.innerHTML = `
|
| 873 |
<div class="rank-badge" style="background: ${rankColor};">
|
|
@@ -923,16 +930,16 @@
|
|
| 923 |
// 샘플 데이터 표시 함수들
|
| 924 |
function displaySampleHFModels(container) {
|
| 925 |
const sampleData = [
|
| 926 |
-
{ rank: 1, title: 'Llama-3.3-70B-Instruct', author: 'meta-llama', likes: 177000, downloads: 1150000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['llama', '70b', 'instruct'], createdAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString() },
|
| 927 |
-
{ rank: 2, title: 'DeepSeek-R1-Distill-Qwen-32B', author: 'deepseek-ai', likes: 10400, downloads: 567000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['deepseek', 'reasoning'], badge: '🆕 New', createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() },
|
| 928 |
-
{ rank: 3, title: 'Qwen3-235B-A22B', author: 'Qwen', likes: 5370, downloads: 225000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['qwen', 'large'], badge: '🆕 New', createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString() },
|
| 929 |
-
{ rank: 4, title: 'FLUX.1-dev', author: 'black-forest-labs', likes: 29100, downloads: 397000, icon: '🤖', pipeline_tag: 'text-to-image', tags: ['flux', 'diffusion'], createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString() },
|
| 930 |
-
{ rank: 5, title: 'Phi-4', author: 'microsoft', likes: 8900, downloads: 156000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['phi', 'small'], badge: '🆕 New', createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString() },
|
| 931 |
-
{ rank: 6, title: 'stable-diffusion-3.5-large', author: 'stabilityai', likes: 7650, downloads: 234000, icon: '🤖', pipeline_tag: 'text-to-image', tags: ['sd3', 'large'], createdAt: new Date(Date.now() - 15 * 24 * 60 * 60 * 1000).toISOString() },
|
| 932 |
-
{ rank: 7, title: 'whisper-large-v3-turbo', author: 'openai', likes: 6780, downloads: 189000, icon: '🤖', pipeline_tag: 'automatic-speech-recognition', tags: ['whisper', 'asr'], createdAt: new Date(Date.now() - 20 * 24 * 60 * 60 * 1000).toISOString() },
|
| 933 |
-
{ rank: 8, title: 'MusicGen-Stereo-Melody', author: 'facebook', likes: 5430, downloads: 98000, icon: '🤖', pipeline_tag: 'text-to-audio', tags: ['music', 'generation'], createdAt: new Date(Date.now() - 25 * 24 * 60 * 60 * 1000).toISOString() },
|
| 934 |
-
{ rank: 9, title: 'Florence-2-large', author: 'microsoft', likes: 4890, downloads: 87000, icon: '🤖', pipeline_tag: 'image-text-to-text', tags: ['vision', 'florence'], createdAt: new Date(Date.now() - 18 * 24 * 60 * 60 * 1000).toISOString() },
|
| 935 |
-
{ rank: 10, title: 'QwQ-32B-Preview', author: 'Qwen', likes: 4560, downloads: 76000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['reasoning', 'cot'], badge: '🆕 New', createdAt: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString() }
|
| 936 |
];
|
| 937 |
|
| 938 |
sampleData.forEach(model => {
|
|
@@ -944,16 +951,16 @@
|
|
| 944 |
|
| 945 |
function displaySampleHFSpaces(container) {
|
| 946 |
const sampleData = [
|
| 947 |
-
{ rank: 1, title: 'stable-diffusion-webui', author: 'stabilityai', likes: 75500, sdk: 'Gradio', icon: '🎨', createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString() },
|
| 948 |
-
{ rank: 2, title: 'chatgpt-clone', author: 'community', likes: 12300, sdk: 'Streamlit', icon: '💬', badge: '🆕 New', createdAt: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString() },
|
| 949 |
-
{ rank: 3, title: 'InstantID', author: 'InstantX', likes: 8590, sdk: 'Gradio', icon: '👤', createdAt: new Date(Date.now() - 12 * 24 * 60 * 60 * 1000).toISOString() },
|
| 950 |
-
{ rank: 4, title: 'voice-clone-xtts', author: 'coqui', likes: 5640, sdk: 'Gradio', icon: '🎤', badge: '🆕 New', createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString() },
|
| 951 |
-
{ rank: 5, title: 'code-llama-playground', author: 'meta', likes: 3210, sdk: 'Gradio', icon: '💻', createdAt: new Date(Date.now() - 20 * 24 * 60 * 60 * 1000).toISOString() },
|
| 952 |
-
{ rank: 6, title: 'image-to-3d-model', author: '3d-ai', likes: 2890, sdk: 'Gradio', icon: '🎲', createdAt: new Date(Date.now() - 15 * 24 * 60 * 60 * 1000).toISOString() },
|
| 953 |
-
{ rank: 7, title: 'music-visualizer', author: 'audio-viz', likes: 2340, sdk: 'Streamlit', icon: '🎵', badge: '🆕 New', createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() },
|
| 954 |
-
{ rank: 8, title: 'pdf-chatbot', author: 'doc-ai', likes: 1980, sdk: 'Gradio', icon: '📄', createdAt: new Date(Date.now() - 25 * 24 * 60 * 60 * 1000).toISOString() },
|
| 955 |
-
{ rank: 9, title: 'anime-art-generator', author: 'waifu-ai', likes: 1670, sdk: 'Gradio', icon: '🎌', createdAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString() },
|
| 956 |
-
{ rank: 10, title: 'dataset-explorer', author: 'data-tools', likes: 1450, sdk: 'Streamlit', icon: '📊', createdAt: new Date(Date.now() - 8 * 24 * 60 * 60 * 1000).toISOString() }
|
| 957 |
];
|
| 958 |
|
| 959 |
sampleData.forEach(space => {
|
|
@@ -1040,7 +1047,7 @@
|
|
| 1040 |
function filterAndDisplayModels() {
|
| 1041 |
const searchTerm = document.getElementById('models-search').value.toLowerCase();
|
| 1042 |
const categoryFilter = document.getElementById('models-category-filter').value;
|
| 1043 |
-
const sortFilter = document.getElementById('models-sort-filter').value;
|
| 1044 |
|
| 1045 |
// 필터링
|
| 1046 |
filteredModelsData = allModelsData.filter(model => {
|
|
@@ -1066,7 +1073,7 @@
|
|
| 1066 |
function filterAndDisplaySpaces() {
|
| 1067 |
const searchTerm = document.getElementById('spaces-search').value.toLowerCase();
|
| 1068 |
const sdkFilter = document.getElementById('spaces-sdk-filter').value;
|
| 1069 |
-
const sortFilter = document.getElementById('spaces-sort-filter').value;
|
| 1070 |
|
| 1071 |
// 필터링
|
| 1072 |
filteredSpacesData = allSpacesData.filter(space => {
|
|
@@ -1091,6 +1098,9 @@
|
|
| 1091 |
// 데이터 정렬
|
| 1092 |
function sortData(data, sortType) {
|
| 1093 |
switch(sortType) {
|
|
|
|
|
|
|
|
|
|
| 1094 |
case 'likes':
|
| 1095 |
data.sort((a, b) => (b.likes || 0) - (a.likes || 0));
|
| 1096 |
break;
|
|
|
|
| 505 |
<option value="image-text-to-text">Vision-Language</option>
|
| 506 |
</select>
|
| 507 |
<select class="filter-select" id="models-sort-filter">
|
| 508 |
+
<option value="trending">Trending (7d)</option>
|
| 509 |
<option value="likes">Most Liked</option>
|
| 510 |
<option value="downloads">Most Downloaded</option>
|
| 511 |
<option value="recent">Recently Added</option>
|
|
|
|
| 540 |
<option value="docker">Docker</option>
|
| 541 |
</select>
|
| 542 |
<select class="filter-select" id="spaces-sort-filter">
|
| 543 |
+
<option value="trending">Trending (7d)</option>
|
| 544 |
<option value="likes">Most Liked</option>
|
| 545 |
<option value="recent">Recently Added</option>
|
| 546 |
</select>
|
|
|
|
| 756 |
|
| 757 |
return {
|
| 758 |
rank: index + 1,
|
| 759 |
+
trendingRank: index + 1, // 원본 순위 보존
|
| 760 |
title: modelName,
|
| 761 |
author: author,
|
| 762 |
url: url,
|
|
|
|
| 810 |
|
| 811 |
return {
|
| 812 |
rank: index + 1,
|
| 813 |
+
trendingRank: index + 1, // 원본 trending 순위 보존
|
| 814 |
title: model.id?.split('/')[1] || model.modelId || 'Unknown',
|
| 815 |
author: model.id?.split('/')[0] || model.author || 'Unknown',
|
| 816 |
likes: model.likes || 0,
|
|
|
|
| 844 |
|
| 845 |
return {
|
| 846 |
rank: index + 1,
|
| 847 |
+
trendingRank: index + 1, // 원본 trending 순위 보존
|
| 848 |
title: space.id?.split('/')[1] || 'Unknown',
|
| 849 |
author: space.id?.split('/')[0] || 'Unknown',
|
| 850 |
likes: space.likes || 0,
|
|
|
|
| 869 |
card.onclick = () => window.open(data.url, '_blank');
|
| 870 |
|
| 871 |
let rankColor = '#999';
|
| 872 |
+
// trendingRank가 있으면 그것을 기준으로, 없으면 rank를 기준으로
|
| 873 |
+
const displayRank = data.trendingRank || data.rank;
|
| 874 |
+
if (displayRank === 1) rankColor = '#FFD700';
|
| 875 |
+
else if (displayRank === 2) rankColor = '#C0C0C0';
|
| 876 |
+
else if (displayRank === 3) rankColor = '#CD7F32';
|
| 877 |
+
else if (displayRank <= 10) rankColor = '#667eea';
|
| 878 |
|
| 879 |
card.innerHTML = `
|
| 880 |
<div class="rank-badge" style="background: ${rankColor};">
|
|
|
|
| 930 |
// 샘플 데이터 표시 함수들
|
| 931 |
function displaySampleHFModels(container) {
|
| 932 |
const sampleData = [
|
| 933 |
+
{ rank: 1, trendingRank: 1, title: 'Llama-3.3-70B-Instruct', author: 'meta-llama', likes: 177000, downloads: 1150000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['llama', '70b', 'instruct'], createdAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString() },
|
| 934 |
+
{ rank: 2, trendingRank: 2, title: 'DeepSeek-R1-Distill-Qwen-32B', author: 'deepseek-ai', likes: 10400, downloads: 567000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['deepseek', 'reasoning'], badge: '🆕 New', createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() },
|
| 935 |
+
{ rank: 3, trendingRank: 3, title: 'Qwen3-235B-A22B', author: 'Qwen', likes: 5370, downloads: 225000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['qwen', 'large'], badge: '🆕 New', createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString() },
|
| 936 |
+
{ rank: 4, trendingRank: 4, title: 'FLUX.1-dev', author: 'black-forest-labs', likes: 29100, downloads: 397000, icon: '🤖', pipeline_tag: 'text-to-image', tags: ['flux', 'diffusion'], createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString() },
|
| 937 |
+
{ rank: 5, trendingRank: 5, title: 'Phi-4', author: 'microsoft', likes: 8900, downloads: 156000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['phi', 'small'], badge: '🆕 New', createdAt: new Date(Date.now() - 2 * 24 * 60 * 60 * 1000).toISOString() },
|
| 938 |
+
{ rank: 6, trendingRank: 6, title: 'stable-diffusion-3.5-large', author: 'stabilityai', likes: 7650, downloads: 234000, icon: '🤖', pipeline_tag: 'text-to-image', tags: ['sd3', 'large'], createdAt: new Date(Date.now() - 15 * 24 * 60 * 60 * 1000).toISOString() },
|
| 939 |
+
{ rank: 7, trendingRank: 7, title: 'whisper-large-v3-turbo', author: 'openai', likes: 6780, downloads: 189000, icon: '🤖', pipeline_tag: 'automatic-speech-recognition', tags: ['whisper', 'asr'], createdAt: new Date(Date.now() - 20 * 24 * 60 * 60 * 1000).toISOString() },
|
| 940 |
+
{ rank: 8, trendingRank: 8, title: 'MusicGen-Stereo-Melody', author: 'facebook', likes: 5430, downloads: 98000, icon: '🤖', pipeline_tag: 'text-to-audio', tags: ['music', 'generation'], createdAt: new Date(Date.now() - 25 * 24 * 60 * 60 * 1000).toISOString() },
|
| 941 |
+
{ rank: 9, trendingRank: 9, title: 'Florence-2-large', author: 'microsoft', likes: 4890, downloads: 87000, icon: '🤖', pipeline_tag: 'image-text-to-text', tags: ['vision', 'florence'], createdAt: new Date(Date.now() - 18 * 24 * 60 * 60 * 1000).toISOString() },
|
| 942 |
+
{ rank: 10, trendingRank: 10, title: 'QwQ-32B-Preview', author: 'Qwen', likes: 4560, downloads: 76000, icon: '🤖', pipeline_tag: 'text-generation', tags: ['reasoning', 'cot'], badge: '🆕 New', createdAt: new Date(Date.now() - 6 * 24 * 60 * 60 * 1000).toISOString() }
|
| 943 |
];
|
| 944 |
|
| 945 |
sampleData.forEach(model => {
|
|
|
|
| 951 |
|
| 952 |
function displaySampleHFSpaces(container) {
|
| 953 |
const sampleData = [
|
| 954 |
+
{ rank: 1, trendingRank: 1, title: 'stable-diffusion-webui', author: 'stabilityai', likes: 75500, sdk: 'Gradio', icon: '🎨', createdAt: new Date(Date.now() - 30 * 24 * 60 * 60 * 1000).toISOString() },
|
| 955 |
+
{ rank: 2, trendingRank: 2, title: 'chatgpt-clone', author: 'community', likes: 12300, sdk: 'Streamlit', icon: '💬', badge: '🆕 New', createdAt: new Date(Date.now() - 4 * 24 * 60 * 60 * 1000).toISOString() },
|
| 956 |
+
{ rank: 3, trendingRank: 3, title: 'InstantID', author: 'InstantX', likes: 8590, sdk: 'Gradio', icon: '👤', createdAt: new Date(Date.now() - 12 * 24 * 60 * 60 * 1000).toISOString() },
|
| 957 |
+
{ rank: 4, trendingRank: 4, title: 'voice-clone-xtts', author: 'coqui', likes: 5640, sdk: 'Gradio', icon: '🎤', badge: '🆕 New', createdAt: new Date(Date.now() - 5 * 24 * 60 * 60 * 1000).toISOString() },
|
| 958 |
+
{ rank: 5, trendingRank: 5, title: 'code-llama-playground', author: 'meta', likes: 3210, sdk: 'Gradio', icon: '💻', createdAt: new Date(Date.now() - 20 * 24 * 60 * 60 * 1000).toISOString() },
|
| 959 |
+
{ rank: 6, trendingRank: 6, title: 'image-to-3d-model', author: '3d-ai', likes: 2890, sdk: 'Gradio', icon: '🎲', createdAt: new Date(Date.now() - 15 * 24 * 60 * 60 * 1000).toISOString() },
|
| 960 |
+
{ rank: 7, trendingRank: 7, title: 'music-visualizer', author: 'audio-viz', likes: 2340, sdk: 'Streamlit', icon: '🎵', badge: '🆕 New', createdAt: new Date(Date.now() - 3 * 24 * 60 * 60 * 1000).toISOString() },
|
| 961 |
+
{ rank: 8, trendingRank: 8, title: 'pdf-chatbot', author: 'doc-ai', likes: 1980, sdk: 'Gradio', icon: '📄', createdAt: new Date(Date.now() - 25 * 24 * 60 * 60 * 1000).toISOString() },
|
| 962 |
+
{ rank: 9, trendingRank: 9, title: 'anime-art-generator', author: 'waifu-ai', likes: 1670, sdk: 'Gradio', icon: '🎌', createdAt: new Date(Date.now() - 10 * 24 * 60 * 60 * 1000).toISOString() },
|
| 963 |
+
{ rank: 10, trendingRank: 10, title: 'dataset-explorer', author: 'data-tools', likes: 1450, sdk: 'Streamlit', icon: '📊', createdAt: new Date(Date.now() - 8 * 24 * 60 * 60 * 1000).toISOString() }
|
| 964 |
];
|
| 965 |
|
| 966 |
sampleData.forEach(space => {
|
|
|
|
| 1047 |
function filterAndDisplayModels() {
|
| 1048 |
const searchTerm = document.getElementById('models-search').value.toLowerCase();
|
| 1049 |
const categoryFilter = document.getElementById('models-category-filter').value;
|
| 1050 |
+
const sortFilter = document.getElementById('models-sort-filter').value || 'trending';
|
| 1051 |
|
| 1052 |
// 필터링
|
| 1053 |
filteredModelsData = allModelsData.filter(model => {
|
|
|
|
| 1073 |
function filterAndDisplaySpaces() {
|
| 1074 |
const searchTerm = document.getElementById('spaces-search').value.toLowerCase();
|
| 1075 |
const sdkFilter = document.getElementById('spaces-sdk-filter').value;
|
| 1076 |
+
const sortFilter = document.getElementById('spaces-sort-filter').value || 'trending';
|
| 1077 |
|
| 1078 |
// 필터링
|
| 1079 |
filteredSpacesData = allSpacesData.filter(space => {
|
|
|
|
| 1098 |
// 데이터 정렬
|
| 1099 |
function sortData(data, sortType) {
|
| 1100 |
switch(sortType) {
|
| 1101 |
+
case 'trending':
|
| 1102 |
+
data.sort((a, b) => (a.trendingRank || 999) - (b.trendingRank || 999));
|
| 1103 |
+
break;
|
| 1104 |
case 'likes':
|
| 1105 |
data.sort((a, b) => (b.likes || 0) - (a.likes || 0));
|
| 1106 |
break;
|