openfree commited on
Commit
4a5ccaa
ยท
verified ยท
1 Parent(s): f98e09c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +2 -21
index.html CHANGED
@@ -227,17 +227,6 @@
227
  "aiqtech/FLUX-Ghibli-Studio-LoRA": "https://huggingface.co/spaces/aiqtech/FLUX-Ghibli-Studio-LoRA",
228
  "aiqtech/flxgif": "https://huggingface.co/spaces/aiqtech/flxgif",
229
  "aiqtech/imaginpaint": "https://huggingface.co/spaces/aiqtech/imaginpaint"
230
- };
231
-
232
- // 2. URL ๋ณ€ํ™˜ ํ•จ์ˆ˜: "https://huggingface.co/spaces/{namespace}/{project}" โ†’ "https://{namespace}-{project}.hf.space"
233
- function transformUrl(url) {
234
- const prefix = "https://huggingface.co/spaces/";
235
- if (url.startsWith(prefix)) {
236
- const rest = url.substring(prefix.length);
237
- return "https://" + rest.replace("/", "-") + ".hf.space";
238
- }
239
- return url;
240
- }
241
 
242
 
243
  // 3. ์‚ฌ์šฉ์ž ๊ฐœ๋ณ„ ์ง€์ •์šฉ ๊ฐ์ฒด
@@ -381,14 +370,9 @@
381
  }
382
 
383
  // 4. ๊ฐ ํ•ญ๋ชฉ์˜ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ customCategories์—์„œ ์ง€์ •๋œ ๊ฐ’์ด ์žˆ์œผ๋ฉด ์‚ฌ์šฉํ•˜๊ณ , ์—†์œผ๋ฉด ๊ธฐ๋ณธ๊ฐ’ "Image Gen" ์‚ฌ์šฉ
384
- // ํ”„๋กœ์ ํŠธ ์ด๋ฆ„์€ "๊ธฐ๋ณธ์นดํ…Œ๊ณ ๋ฆฌ/ํ”„๋กœ์ ํŠธ๋ช…" ํ˜•ํƒœ๋กœ ํ‘œ์‹œํ•ฉ๋‹ˆ๋‹ค.
385
  const keys = Object.keys(projectList);
386
  const projects = keys.map((key) => {
387
- // ๊ธฐ๋ณธ ์นดํ…Œ๊ณ ๋ฆฌ (customCategories์— ์ง€์ •๋œ ๊ฐ’์ด ์žˆ์œผ๋ฉด ์‚ฌ์šฉ, ์—†์œผ๋ฉด "Image Gen")
388
  let primaryCategory = customCategories[key] || "Image Gen";
389
-
390
- // NEW์™€ BEST ์นดํ…Œ๊ณ ๋ฆฌ๋Š” ๋ณ„๋„๋กœ ์ถ”๊ฐ€ํ•  ์ˆ˜ ์žˆ๋„๋ก ํ•ฉ๋‹ˆ๋‹ค.
391
- // ์˜ˆ์‹œ: ๋งŒ์•ฝ ์›๋ž˜ key์™€ ๋ณ„๋„๋กœ "_NEW"๋‚˜ "_BEST"๊ฐ€ ๋ถ™์€ ํ‚ค๊ฐ€ ์žˆ๋‹ค๋ฉด ์ด๋ฅผ NEW ๋˜๋Š” BEST๋กœ ์ฒ˜๋ฆฌํ•ฉ๋‹ˆ๋‹ค.
392
  let categories = [primaryCategory];
393
  if (key.endsWith("_NEW")) {
394
  categories.push("NEW");
@@ -396,13 +380,10 @@
396
  if (key.endsWith("_BEST")) {
397
  categories.push("BEST");
398
  }
399
-
400
- // ์›๋ž˜ ํ”„๋กœ์ ํŠธ๋ช…์€ key์—์„œ "/" ์ดํ›„ ๋ถ€๋ถ„์„ ์‚ฌ์šฉ (๋‹จ, NEW/BEST ์˜ˆ์‹œ๋Š” ๊ทธ๋Œ€๋กœ ์‚ฌ์šฉ)
401
  let projectName = key;
402
  if (!key.endsWith("_NEW") && !key.endsWith("_BEST")) {
403
  projectName = key.split("/").slice(1).join("/");
404
  }
405
-
406
  return {
407
  name: primaryCategory + "/" + projectName,
408
  url: transformUrl(projectList[key]),
@@ -421,7 +402,7 @@
421
  });
422
  });
423
 
424
- // 6. ํ•„ํ„ฐ ๋ฒ„ํŠผ์€ ๋ฏธ๋ฆฌ ์ •์˜ํ•œ 10๊ฐ€์ง€ ๊ทธ๋ฃน(NEW, BEST, Text, Image Gen, Image Edit, Audio, Video, Productivity, Utility, Vision)๊ณผ All ๋ฒ„ํŠผ์œผ๋กœ ์ƒ์„ฑ
425
  const fixedGroups = ["NEW", "BEST", "Text", "Image Gen", "Image Edit", "Audio", "Video", "Productivity", "Utility", "Vision"];
426
  const filterGroupDiv = document.getElementById("filter-group");
427
  const allButton = document.createElement("button");
@@ -437,7 +418,7 @@
437
  filterGroupDiv.appendChild(btn);
438
  });
439
 
440
- // 7. ์‚ฌ์ด๋“œ๋ฐ” ์—…๋ฐ์ดํŠธ ํ•จ์ˆ˜: ์„ ํƒํ•œ ํ•„ํ„ฐ์˜ ํ•ญ๋ชฉ์„ ์ถœ๋ ฅ (ํ•ด๋‹น ํ•ญ๋ชฉ์˜ categories ๋ฐฐ์—ด์— ์„ ํƒํ•œ ํ•„ํ„ฐ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์œผ๋ฉด ํ‘œ์‹œ)
441
  function updateSidebar(filter) {
442
  const sidebar = document.getElementById("sidebar");
443
  sidebar.innerHTML = "";
 
227
  "aiqtech/FLUX-Ghibli-Studio-LoRA": "https://huggingface.co/spaces/aiqtech/FLUX-Ghibli-Studio-LoRA",
228
  "aiqtech/flxgif": "https://huggingface.co/spaces/aiqtech/flxgif",
229
  "aiqtech/imaginpaint": "https://huggingface.co/spaces/aiqtech/imaginpaint"
 
 
 
 
 
 
 
 
 
 
 
230
 
231
 
232
  // 3. ์‚ฌ์šฉ์ž ๊ฐœ๋ณ„ ์ง€์ •์šฉ ๊ฐ์ฒด
 
370
  }
371
 
372
  // 4. ๊ฐ ํ•ญ๋ชฉ์˜ ์นดํ…Œ๊ณ ๋ฆฌ๋ฅผ customCategories์—์„œ ์ง€์ •๋œ ๊ฐ’์ด ์žˆ์œผ๋ฉด ์‚ฌ์šฉํ•˜๊ณ , ์—†์œผ๋ฉด ๊ธฐ๋ณธ๊ฐ’ "Image Gen" ์‚ฌ์šฉ
 
373
  const keys = Object.keys(projectList);
374
  const projects = keys.map((key) => {
 
375
  let primaryCategory = customCategories[key] || "Image Gen";
 
 
 
376
  let categories = [primaryCategory];
377
  if (key.endsWith("_NEW")) {
378
  categories.push("NEW");
 
380
  if (key.endsWith("_BEST")) {
381
  categories.push("BEST");
382
  }
 
 
383
  let projectName = key;
384
  if (!key.endsWith("_NEW") && !key.endsWith("_BEST")) {
385
  projectName = key.split("/").slice(1).join("/");
386
  }
 
387
  return {
388
  name: primaryCategory + "/" + projectName,
389
  url: transformUrl(projectList[key]),
 
402
  });
403
  });
404
 
405
+ // 6. ํ•„ํ„ฐ ๋ฒ„ํŠผ ์ƒ์„ฑ (๋ฏธ๋ฆฌ ์ •์˜ํ•œ 10๊ฐ€์ง€ ๊ทธ๋ฃน ๋ฐ All)
406
  const fixedGroups = ["NEW", "BEST", "Text", "Image Gen", "Image Edit", "Audio", "Video", "Productivity", "Utility", "Vision"];
407
  const filterGroupDiv = document.getElementById("filter-group");
408
  const allButton = document.createElement("button");
 
418
  filterGroupDiv.appendChild(btn);
419
  });
420
 
421
+ // 7. ์‚ฌ์ด๋“œ๋ฐ” ์—…๋ฐ์ดํŠธ ํ•จ์ˆ˜: ์„ ํƒํ•œ ํ•„ํ„ฐ์˜ ํ•ญ๋ชฉ ์ถœ๋ ฅ (ํ•ด๋‹น ํ•ญ๋ชฉ์˜ categories ๋ฐฐ์—ด์— ์„ ํƒํ•œ ํ•„ํ„ฐ๊ฐ€ ํฌํ•จ๋˜์–ด ์žˆ์œผ๋ฉด ํ‘œ์‹œ)
422
  function updateSidebar(filter) {
423
  const sidebar = document.getElementById("sidebar");
424
  sidebar.innerHTML = "";