File size: 24,053 Bytes
79fd234
2de9c75
79fd234
2de9c75
 
 
79fd234
 
2de9c75
79fd234
 
2de9c75
 
79fd234
 
 
 
 
2de9c75
79fd234
 
 
2de9c75
79fd234
 
 
2de9c75
 
79fd234
2de9c75
 
 
79fd234
2de9c75
79fd234
2de9c75
79fd234
 
2de9c75
79fd234
 
2de9c75
79fd234
2de9c75
79fd234
 
2de9c75
79fd234
2de9c75
 
935ba76
79fd234
2de9c75
 
 
 
 
79fd234
2de9c75
 
 
 
79fd234
2de9c75
 
 
 
 
 
 
03fdefd
 
 
2de9c75
 
 
 
03fdefd
 
 
 
 
 
 
 
 
2de9c75
 
 
f63c073
2de9c75
 
 
 
 
 
 
f63c073
79fd234
 
 
 
3432de9
79fd234
7713c0b
935ba76
 
 
 
ce04c8d
2de9c75
edda023
2de9c75
 
79fd234
 
b506363
79fd234
edda023
2de9c75
edda023
2de9c75
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edda023
2de9c75
edda023
 
74fbdbd
 
e124c2a
 
 
bc302f0
e124c2a
bc302f0
e124c2a
 
 
 
 
edda023
e124c2a
edda023
bc302f0
e124c2a
 
bc302f0
 
e124c2a
 
 
 
 
 
 
 
 
bc302f0
 
e124c2a
 
bc302f0
e124c2a
 
 
bc302f0
 
e124c2a
 
bc302f0
edda023
e124c2a
 
 
bc302f0
e124c2a
5ce7441
bc302f0
5ce7441
bc302f0
 
5ce7441
 
 
 
 
 
bc302f0
 
 
5ce7441
 
 
 
 
 
bc302f0
 
 
 
 
 
 
5ce7441
bc302f0
 
 
5ce7441
 
 
bc302f0
 
 
 
5ce7441
 
 
 
bc302f0
 
 
5ce7441
bc302f0
 
5ce7441
bc302f0
 
5ce7441
bc302f0
5ce7441
bc302f0
edda023
bc302f0
 
5ce7441
 
bc302f0
5ce7441
 
bc302f0
 
7ac5007
 
 
51025e7
4f439de
54e1e3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4f439de
54e1e3e
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7ac5007
51025e7
28c7c97
bc302f0
 
 
 
 
 
 
 
 
28c7c97
0447a88
edda023
935ba76
f98e09c
28c7c97
 
 
edda023
2de9c75
28c7c97
 
 
2de9c75
 
79fd234
28c7c97
2de9c75
935ba76
 
 
 
f98e09c
2de9c75
b506363
28c7c97
0447a88
2de9c75
edda023
2de9c75
 
 
 
 
edda023
0447a88
2de9c75
 
 
 
 
 
b506363
28c7c97
2de9c75
 
0447a88
edda023
 
935ba76
edda023
2de9c75
 
 
03fdefd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
edda023
935ba76
b506363
03fdefd
2de9c75
79fd234
2de9c75
edda023
2de9c75
935ba76
2de9c75
935ba76
2de9c75
 
 
28c7c97
2de9c75
 
935ba76
2de9c75
0447a88
79fd234
 
2de9c75
28c7c97
2de9c75
79fd234
 
03fdefd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
<!DOCTYPE html>
<html lang="ko">
<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1" />
  <title>프로젝트 뷰어 (자동 분류 및 URL 변환)</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      margin: 0;
      padding: 0;
      background-color: #f4f4f9;
      color: #333;
    }
    .github-link {
      text-align: center;
      padding: 8px;
      background-color: #24292e;
      color: #fff;
      font-size: 14px;
    }
    .github-link a {
      color: #fff;
      text-decoration: none;
    }
    .filter-group {
      padding: 10px;
      background-color: #fff;
      border-bottom: 1px solid #eee;
      text-align: center;
      overflow-x: auto;
      white-space: nowrap;
    }
    .filter-group .toggle-button {
      padding: 6px 12px;
      margin: 5px;
      border: 1px solid #ddd;
      border-radius: 15px;
      background-color: #fff;
      font-size: 13px;
      cursor: pointer;
      display: inline-block;
    }
    .filter-group .toggle-button.active {
      background-color: #2196f3;
      border-color: #2196f3;
      color: #fff;
    }
    .main-container {
      display: flex;
      height: calc(100vh - 100px); /* 상단 영역 제외 전체 높이 */
    }
    #sidebar {
      width: 25%;
      border-right: 1px solid #ccc;
      overflow-y: auto;
      padding: 10px;
    }
    #sidebar ul {
      list-style: none;
      padding: 0;
      margin: 0;
    }
    #sidebar li {
      margin: 5px 0;
      padding: 8px;
      background-color: #fff;
      border: 1px solid #ddd;
      border-radius: 4px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    #sidebar li:hover {
      background-color: #f0f0f0;
    }
    #sidebar li button {
      margin-left: 8px;
      padding: 4px 8px;
      cursor: pointer;
      font-size: 12px;
      border-radius: 4px;
      border: 1px solid #ccc;
      background-color: #fafafa;
    }
    #embed-container {
      flex: 1;
      padding: 0;
      margin: 0;
      background-color: #fff;
    }
    #embed-container iframe {
      width: 100%;
      height: 100%;
      border: none;
      display: block;
    }
  </style>
</head>
<body>
  <div class="github-link">
    <a href="https://discord.gg/openfreeai" target="_blank">Community</a>
  </div>

  <!-- 필터 버튼 영역 -->
  <div class="filter-group" id="filter-group">
    <!-- JavaScript로 동적으로 버튼 생성 -->
  </div>

  <div class="main-container">
    <div id="sidebar"></div>
    <div id="embed-container">
      <iframe id="embed-frame" src=""></iframe>
    </div>
  </div>

  <script>
    // 1. 프로젝트 URL 목록: 프로젝트 이름 -> URL
    const projectList = {
      "fantos/Panorama": "https://huggingface.co/spaces/fantos/Panorama",
      "ginigen/Multi-LoRAgen": "https://huggingface.co/spaces/ginigen/Multi-LoRAgen",
      "ginigen/canvas-studio": "https://huggingface.co/spaces/ginigen/canvas-studio",
      "ginipick/Fashion-Stylegen": "https://huggingface.co/spaces/ginipick/Fashion-Style",
      "ginipick/Time-Stream": "https://huggingface.co/spaces/ginipick/Time-Stream",
      "ginipick/AccuVision-Diffusion": "https://huggingface.co/spaces/ginipick/AccuVision-Diffusion",
      "fantos/Magic-Drawings": "https://huggingface.co/spaces/fantos/Magic-Drawings",
      "ginigen/Lumina-Image-PLUS": "https://huggingface.co/spaces/ginigen/Lumina-Image-PLUS",
      "fantaxy/fantasy-novel": "https://huggingface.co/spaces/fantaxy/fantasy-novel",
      "fantaxy/eros": "https://huggingface.co/spaces/fantaxy/eros",
      "fantaxy/adult-novel": "https://huggingface.co/spaces/fantaxy/adult-novel",
      "fantaxy/kungfu-novel": "https://huggingface.co/spaces/fantaxy/kungfu-novel",
      "fantaxy/love-novel": "https://huggingface.co/spaces/fantaxy/love-novel",
      "VIDraft/mouse-webgen": "https://huggingface.co/spaces/VIDraft/mouse-webgen",
      "immunobiotech/MUSIC-Jukebox": "https://huggingface.co/spaces/immunobiotech/MUSIC-Jukebox",
      "seawolf2357/Flowise-AI": "https://huggingface.co/spaces/seawolf2357/Flowise-AI",
      "ginigen/Flux-LayerDiffuse": "https://huggingface.co/spaces/ginigen/Flux-LayerDiffuse",
      "VIDraft/Portrait-Animation": "https://huggingface.co/spaces/VIDraft/Portrait-Animation",
      "VIDraft/Deepseek-Multimodal": "https://huggingface.co/spaces/VIDraft/Deepseek-Multimodal",
      "VIDraft/BLIP2": "https://huggingface.co/spaces/VIDraft/BLIP2",
      "ginigen/text3d-r1": "https://huggingface.co/spaces/ginigen/text3d-r1",
      "immunobiotech/drug-discovery": "https://huggingface.co/spaces/immunobiotech/drug-discovery",
      "openfree/VisionOCR-Chat": "https://huggingface.co/spaces/openfree/VisionOCR-Chat",
      "immunobiotech/MICHELIN": "https://huggingface.co/spaces/immunobiotech/MICHELIN",
      "immunobiotech/MICHELIN-korea": "https://huggingface.co/spaces/immunobiotech/MICHELIN-korea",
      "immunobiotech/MICHELIN-japan": "https://huggingface.co/spaces/immunobiotech/MICHELIN-japan",
      "immunobiotech/MICHELIN-china": "https://huggingface.co/spaces/immunobiotech/MICHELIN-china",
      "VIDraft/money-radar-korea": "https://huggingface.co/spaces/VIDraft/money-radar-korea",
      "VIDraft/money-radar": "https://huggingface.co/spaces/VIDraft/money-radar",
      "ginipick/PharmAI-Korea": "https://huggingface.co/spaces/ginipick/PharmAI-Korea",
      "ginigen/MagicFace-V3": "https://huggingface.co/spaces/ginigen/MagicFace-V3",
      "aiqcamp/MindMap": "https://huggingface.co/spaces/aiqcamp/MindMap",
      "ginigen/3D-LLAMA": "https://huggingface.co/spaces/ginigen/3D-LLAMA",
      "openfree/VectorFlow": "https://huggingface.co/spaces/openfree/VectorFlow",
      "openfree/webtoon-gen": "https://huggingface.co/spaces/openfree/webtoon-gen",
      "VIDraft/topic-prediction": "https://huggingface.co/spaces/VIDraft/topic-prediction",
      "VIDraft/PapersImpact": "https://huggingface.co/spaces/VIDraft/PapersImpact",
      "VIDraft/EveryRAG": "https://huggingface.co/spaces/VIDraft/EveryRAG",
      "VIDraft/korea-president-DJ": "https://huggingface.co/spaces/VIDraft/korea-president-DJ",
      "VIDraft/korea-president-PARK": "https://huggingface.co/spaces/VIDraft/korea-president-PARK",
      "openfree/image-to-vector": "https://huggingface.co/spaces/openfree/image-to-vector",
      "ginipick/QR-Canvas-plus": "https://huggingface.co/spaces/ginipick/QR-Canvas-plus",
      "ginigen/text3d-R1": "https://huggingface.co/spaces/ginigen/text3d-R1",
      "openfree/MagicFace-V3": "https://huggingface.co/spaces/openfree/MagicFace-V3",
      "ginipick/DeepSeekR1-LIVE": "https://huggingface.co/spaces/ginipick/DeepSeekR1-LIVE",
      "ginigen/ColPali-multi": "https://huggingface.co/spaces/ginigen/ColPali-multi",
      "ginigen/Janus-Pro-7B": "https://huggingface.co/spaces/ginigen/Janus-Pro-7B",
      "ginigen/Animagine": "https://huggingface.co/spaces/ginigen/Animagine",
      "openfree/PDF-RAG": "https://huggingface.co/spaces/openfree/PDF-RAG",
      "fantos/Ranking-Tracker": "https://huggingface.co/spaces/fantos/Ranking-Tracker",
      "aiqcamp/Multilingual-Images": "https://huggingface.co/spaces/aiqcamp/Multilingual-Images",
      "aiqcamp/Gemini2-Flash-Thinking": "https://huggingface.co/spaces/aiqcamp/Gemini2-Flash-Thinking",
      "openfree/pepe": "https://huggingface.co/spaces/openfree/pepe",
      "openfree/korea-president-yoon": "https://huggingface.co/spaces/openfree/korea-president-yoon",
      "openfree/CryptoVision": "https://huggingface.co/spaces/openfree/CryptoVision",
      "fantos/VoiceClone": "https://huggingface.co/spaces/fantos/VoiceClone",
      "seawolf2357/ocrlatex": "https://huggingface.co/spaces/seawolf2357/ocrlatex",
      "seawolf2357/img2vid": "https://huggingface.co/spaces/seawolf2357/img2vid",
      "seawolf2357/sd-prompt-gen": "https://huggingface.co/spaces/seawolf2357/sd-prompt-gen",
      "openfree/tarotcard": "https://huggingface.co/spaces/openfree/tarotcard",
      "aiqcamp/Polaroid": "https://huggingface.co/spaces/aiqcamp/Polaroid",
      "ginigen/cartoon": "https://huggingface.co/spaces/ginigen/cartoon",
      "ginigen/Book-Cover": "https://huggingface.co/spaces/ginigen/Book-Cover",
      "aiqcamp/fash": "https://huggingface.co/spaces/aiqcamp/fash",
      "gunship999/Korea-Daily-News": "https://huggingface.co/spaces/gunship999/Korea-Daily-News",
      "immunobiotech/ChicagoGallery": "https://huggingface.co/spaces/immunobiotech/ChicagoGallery",
      "immunobiotech/MetropolitanMuseum": "https://huggingface.co/spaces/immunobiotech/MetropolitanMuseum",
      "immunobiotech/opensky": "https://huggingface.co/spaces/immunobiotech/opensky",
      "aiqtech/FLUX-military": "https://huggingface.co/spaces/aiqtech/FLUX-military",
      "fantaxy/Rolls-Royce": "https://huggingface.co/spaces/fantaxy/Rolls-Royce",
      "seawolf2357/flux-korea-hanbok-lora": "https://huggingface.co/spaces/seawolf2357/flux-korea-hanbok-lora",
      "seawolf2357/flux-korea-palace-lora": "https://huggingface.co/spaces/seawolf2357/flux-korea-palace-lora",
      "aiqcamp/flux-cat-lora": "https://huggingface.co/spaces/aiqcamp/flux-cat-lora",
      "gunship999/SexyImages": "https://huggingface.co/spaces/gunship999/SexyImages",
      "aiqtech/flux-claude-monet-lora": "https://huggingface.co/spaces/aiqtech/flux-claude-monet-lora",
      "seawolf2357/3D-Avatar-Generator": "https://huggingface.co/spaces/seawolf2357/3D-Avatar-Generator",
      "fantaxy/playground25": "https://huggingface.co/spaces/fantaxy/playground25",
      "openfree/ultpixgen": "https://huggingface.co/spaces/openfree/ultpixgen",
      "seawolf2357/REALVISXL-V5": "https://huggingface.co/spaces/seawolf2357/REALVISXL-V5",
      "fantos/flxcontrol": "https://huggingface.co/spaces/fantos/flxcontrol",
      "fantos/textcutobject": "https://huggingface.co/spaces/fantos/textcutobject",
      "ginipick/FLUX-Prompt-Generator": "https://huggingface.co/spaces/ginipick/FLUX-Prompt-Generator",
      "fantaxy/flxloraexp": "https://huggingface.co/spaces/fantaxy/flxloraexp",
      "fantos/flxloraexp": "https://huggingface.co/spaces/fantos/flxloraexp",
      "seawolf2357/flxloraexp": "https://huggingface.co/spaces/seawolf2357/flxloraexp",
      "ginipick/flxloraexp": "https://huggingface.co/spaces/ginipick/flxloraexp",
      "aiqcamp/imagemagic": "https://huggingface.co/spaces/aiqcamp/imagemagic",
      "openfree/ColorRevive": "https://huggingface.co/spaces/openfree/ColorRevive",
      "VIDraft/RAGOndevice": "https://huggingface.co/spaces/VIDraft/RAGOndevice",
      "aiqcamp/AudioLlama": "https://huggingface.co/spaces/aiqcamp/AudioLlama",
      "ginigen/FLUXllama-Multilingual": "https://huggingface.co/spaces/ginigen/FLUXllama-Multilingual",
      "ginipick/FitGen": "https://huggingface.co/spaces/ginipick/FitGen",
      "fantaxy/FLUX-Animations": "https://huggingface.co/spaces/fantaxy/FLUX-Animations",
      "fantaxy/Remove-Video-Background": "https://huggingface.co/spaces/fantaxy/Remove-Video-Background",
      "fantaxy/ofai-flx-logo": "https://huggingface.co/spaces/fantaxy/ofai-flx-logo",
      "fantaxy/flx-pulid": "https://huggingface.co/spaces/fantaxy/flx-pulid",
      "fantaxy/flx-upscale": "https://huggingface.co/spaces/fantaxy/flx-upscale",
      "aiqcamp/Fashion-FLUX": "https://huggingface.co/spaces/aiqcamp/Fashion-FLUX",
      "fantos/x-mas": "https://huggingface.co/spaces/fantos/x-mas",
      "openfree/Korean-Leaderboard": "https://huggingface.co/spaces/openfree/Korean-Leaderboard",
      "ginipick/FLUXllama": "https://huggingface.co/spaces/ginipick/FLUXllama",
      "fantaxy/Sound-AI-SFX": "https://huggingface.co/spaces/fantaxy/Sound-AI-SFX",
      "fantos/flx8lora": "https://huggingface.co/spaces/fantos/flx8lora",
      "openfree/trending-board": "https://huggingface.co/spaces/openfree/trending-board",
      "ginipick/Realtime-FLUX": "https://huggingface.co/spaces/ginipick/Realtime-FLUX",
      "aiqtech/kofaceid": "https://huggingface.co/spaces/aiqtech/kofaceid",
      "fantaxy/fastvideogena": "https://huggingface.co/spaces/fantaxy/fastvideogen",
      "fantos/cogvidx": "https://huggingface.co/spaces/fantos/cogvidx",
      "fantos/flxfashmodel": "https://huggingface.co/spaces/fantos/flxfashmodel",
      "fantos/kolcontrl": "https://huggingface.co/spaces/fantos/kolcontrl",
      "aiqtech/cinevid": "https://huggingface.co/spaces/aiqtech/cinevid",
      "aiqtech/FLUX-Ghibli-Studio-LoRA": "https://huggingface.co/spaces/aiqtech/FLUX-Ghibli-Studio-LoRA",
      "aiqtech/flxgif": "https://huggingface.co/spaces/aiqtech/flxgif",
      "aiqtech/imaginpaint": "https://huggingface.co/spaces/aiqtech/imaginpaint"
    };

    // 2. 별도 객체: 프로젝트의 개별 카테고리 지정 (없으면 기본값 "Image Gen" 사용)
    const customCategories = {
      "fantos/Panorama": "Image Gen",
      "ginigen/Multi-LoRAgen": "Image Gen",
      "ginigen/canvas-studio": "Image Edit",
      "ginipick/Fashion-Stylegen": "Productivity",
      "ginipick/Time-Stream": "Video",
      "ginipick/AccuVision-Diffusion": "Image Gen",
      "fantos/Magic-Drawings": "Image Edit",
      "ginigen/Lumina-Image-PLUS": "Image Gen",
      "fantaxy/fantasy-novel": "Text",
      "fantaxy/eros": "Text",
      "fantaxy/adult-novel": "Text",
      "fantaxy/kungfu-novel": "Text",
      "fantaxy/love-novel": "Text",
      "VIDraft/mouse-webgen": "Productivity",
      "immunobiotech/MUSIC-Jukebox": "Audio",
      "seawolf2357/Flowise-AI": "Productivity",
      "ginigen/Flux-LayerDiffuse": "Image Gen",
      "VIDraft/Portrait-Animation": "Video",
      "VIDraft/Deepseek-Multimodal": "Vision",
      "VIDraft/BLIP2": "Image Gen",
      "ginigen/text3d-r1": "Image Gen",
      "immunobiotech/drug-discovery": "Productivity",
      "openfree/VisionOCR-Chat": "Vision",
      "immunobiotech/MICHELIN": "Productivity",
      "immunobiotech/MICHELIN-korea": "Productivity",
      "immunobiotech/MICHELIN-japan": "Productivity",
      "immunobiotech/MICHELIN-china": "Productivity",
      "VIDraft/money-radar-korea": "Productivity",
      "VIDraft/money-radar": "Productivity",
      "ginipick/PharmAI-Korea": "Productivity",
      "ginigen/MagicFace-V3": "Image Gen",
      "aiqcamp/MindMap": "Image Gen",
      "ginigen/3D-LLAMA": "Productivity",
      "openfree/VectorFlow": "Image Edit",
      "openfree/webtoon-gen": "Image Gen",
      "VIDraft/topic-prediction": "Text",
      "VIDraft/PapersImpact": "Productivity",
      "VIDraft/EveryRAG": "Text",
      "VIDraft/korea-president-DJ": "Image Gen",
      "VIDraft/korea-president-PARK": "Image Gen",
      "openfree/image-to-vector": "Image Edit",
      "ginipick/QR-Canvas-plus": "Productivity",
      "ginigen/text3d-R1": "Image Gen",
      "openfree/MagicFace-V3": "Image Edit",
      "ginipick/DeepSeekR1-LIVE": "Text",
      "ginigen/ColPali-multi": "Text",
      "ginigen/Janus-Pro-7B": "Vision",
      "ginigen/Animagine": "Image Gen",
      "openfree/PDF-RAG": "Productivity",
      "fantos/Ranking-Tracker": "Utility",
      "aiqcamp/Multilingual-Images": "Image Gen",
      "aiqcamp/Gemini2-Flash-Thinking": "Text",
      "openfree/pepe": "Image Gen",
      "openfree/korea-president-yoon": "Image Gen",
      "openfree/CryptoVision": "Utility",
      "fantos/VoiceClone": "Audio",
      "seawolf2357/ocrlatex": "Utility",
      "seawolf2357/img2vid": "Video",
      "seawolf2357/sd-prompt-gen": "Text",
      "openfree/tarotcard": "Utility",
      "aiqcamp/Polaroid": "Image Gen",
      "ginigen/cartoon": "Image Gen",
      "ginigen/Book-Cover": "Image Gen",
      "aiqcamp/fash": "Productivity",
      "gunship999/Korea-Daily-News": "Utility",
      "immunobiotech/ChicagoGallery": "Utility",
      "immunobiotech/MetropolitanMuseum": "Utility",
      "immunobiotech/opensky": "Utility",
      "VIDraft/eum": "Text",
      "aiqtech/FLUX-military": "Image Gen",
      "fantaxy/Rolls-Royce": "Image Gen",
      "seawolf2357/flux-korea-hanbok-lora": "Image Gen",
      "seawolf2357/flux-korea-palace-lora": "Image Gen",
      "aiqcamp/flux-cat-lora": "Image Gen",
      "gunship999/SexyImages": "Image Gen",
      "aiqtech/flux-claude-monet-lora": "Image Gen",
      "seawolf2357/3D-Avatar-Generator": "Utility",
      "fantaxy/playground25": "Image Gen",
      "openfree/ultpixgen": "Image Gen",
      "seawolf2357/REALVISXL-V5": "Image Gen",
      "fantos/flxcontrol": "Image Edit",
      "fantos/textcutobject": "Image Edit",
      "ginipick/FLUX-Prompt-Generator": "Text",
      "fantaxy/flxloraexp": "Image Gen",
      "fantos/flxloraexp": "Image Gen",
      "seawolf2357/flxloraexp": "Image Gen",
      "ginipick/flxloraexp": "Image Gen",
      "aiqcamp/imagemagic": "Image Edit",
      "openfree/ColorRevive": "Image Edit",
      "VIDraft/RAGOndevice": "Productivity",
      "aiqcamp/AudioLlama": "Audio",
      "ginigen/FLUXllama-Multilingual": "Image Gen",
      "ginipick/FitGen": "Image Gen",
      "fantaxy/FLUX-Animations": "Image Gen",
      "fantaxy/Remove-Video-Background": "Image Edit",
      "fantaxy/ofai-flx-logo": "Image Gen",
      "fantaxy/flx-pulid": "Image Gen",
      "fantaxy/flx-upscale": "Image Edit",
      "aiqcamp/Fashion-FLUX": "Image Gen",
      "fantos/x-mas": "Image Gen",
      "openfree/Korean-Leaderboard": "Utility",
      "ginipick/FLUXllama": "Image Gen",
      "fantaxy/Sound-AI-SFX": "Audio",
      "fantos/flx8lora": "Image Gen",
      "openfree/trending-board": "Utility",
      "ginipick/Realtime-FLUX": "Image Gen",
      "aiqtech/kofaceid": "Image Gen",
      "fantaxy/fastvideogena": "Video",
      "fantos/cogvidx": "Video",
      "fantos/flxfashmodel": "Image Gen",
      "fantos/kolcontrl": "Image Edit",
      "aiqtech/cinevid": "Video",
      "aiqtech/FLUX-Ghibli-Studio-LoRA": "Image Gen",
      "aiqtech/flxgif": "Image Gen",
      "aiqtech/imaginpaint": "Image Edit"
      

    };

const newProjects = [
  "fantos/Panorama",
  "ginigen/Multi-LoRAgen",
  "ginigen/canvas-studio",
  "ginipick/Fashion-Stylegen",
  "ginipick/Time-Stream",
  "ginipick/AccuVision-Diffusion",
  "fantos/Magic-Drawings",
  "ginigen/Lumina-Image-PLUS",
  "fantaxy/fantasy-novel",
  "fantaxy/eros",
  "fantaxy/adult-novel",
  "fantaxy/kungfu-novel",
  "fantaxy/love-novel",
  "VIDraft/mouse-webgen",
  "immunobiotech/MUSIC-Jukebox",
  "seawolf2357/Flowise-AI",
  "ginigen/Flux-LayerDiffuse",
  "VIDraft/Portrait-Animation",
  "VIDraft/Deepseek-Multimodal",
  "VIDraft/BLIP2",
  "ginigen/text3d-r1",
  "immunobiotech/drug-discovery",
  "openfree/VisionOCR-Chat",
  "immunobiotech/MICHELIN",
  "immunobiotech/MICHELIN-korea",
  "immunobiotech/MICHELIN-japan",
  "immunobiotech/MICHELIN-china",
  "VIDraft/money-radar-korea",
  "VIDraft/money-radar",
  "ginipick/PharmAI-Korea",
  "ginigen/MagicFace-V3",
  "aiqcamp/MindMap",
  "ginigen/3D-LLAMA",
  "openfree/VectorFlow",
  "openfree/webtoon-gen",
  "VIDraft/topic-prediction",
  "VIDraft/PapersImpact",
  "VIDraft/EveryRAG",
  "VIDraft/korea-president-DJ",
  "VIDraft/korea-president-PARK",
  "openfree/image-to-vector",
  "ginipick/QR-Canvas-plus",
  "openfree/MagicFace-V3",
  "ginipick/DeepSeekR1-LIVE",
  "ginigen/ColPali-multi",
  "ginigen/Janus-Pro-7B",
  "ginigen/Animagine",
  "openfree/PDF-RAG",
  "fantos/Ranking-Tracker",
  "aiqcamp/Multilingual-Images",
  "aiqcamp/Gemini2-Flash-Thinking",
  "openfree/pepe",
  "openfree/korea-president-yoon",
  "openfree/CryptoVision",
  "fantos/VoiceClone",
  "seawolf2357/ocrlatex",
  "seawolf2357/img2vid",
  "seawolf2357/sd-prompt-gen",
  "openfree/tarotcard",
  "aiqcamp/Polaroid",
  "ginigen/cartoon",
  "ginigen/Book-Cover"
];

const bestProjects = [
  "openfree/VisionOCR-Chat",
  "ginigen/3D-LLAMA",
  "fantos/Ranking-Tracker",
  "openfree/trending-board",
  "openfree/Korean-Leaderboard",
  "fantos/Panorama",
  "ginigen/Multi-LoRAgen",
  "ginigen/canvas-studio",
  "fantaxy/adult-novel",
  "VIDraft/mouse-webgen",
  "ginigen/text3d-r1",
  "immunobiotech/MICHELIN-korea",
  "VIDraft/money-radar-korea",
  "ginipick/PharmAI-Korea",
  "VIDraft/PapersImpact",
  "aiqcamp/MindMap",
  "VIDraft/EveryRAG",
  "openfree/MagicFace-V3",
  "ginigen/Animagine",
  "openfree/PDF-RAG",
  "aiqcamp/Multilingual-Images",
  "aiqcamp/Gemini2-Flash-Thinking",
  "openfree/CryptoVision",
  "fantos/VoiceClone",
  "seawolf2357/ocrlatex",
  "ginigen/cartoon",
  "ginigen/Book-Cover",
  "aiqcamp/fash",
  "seawolf2357/REALVISXL-V5",
  "aiqcamp/AudioLlama",
  "ginigen/FLUXllama-Multilingual",
  "ginipick/FitGen"
];


    // 4. URL 변환 함수
    function transformUrl(url) {
      const prefix = "https://huggingface.co/spaces/";
      if (url.startsWith(prefix)) {
        const rest = url.substring(prefix.length);
        return "https://" + rest.replace("/", "-") + ".hf.space";
      }
      return url;
    }

    // 5. 프로젝트 배열 생성
    const keys = Object.keys(projectList);
    const projects = keys.map(key => {
      const primaryCategory = customCategories[key] || "Image Gen";
      let categories = [primaryCategory];
      
      if (newProjects.includes(key)) categories.push("NEW");
      if (bestProjects.includes(key)) categories.push("BEST");

      return {
        name: primaryCategory + "/" + key.split("/")[1],
        url: transformUrl(projectList[key]),
        categories: categories
      };
    });

    // 6. 카테고리별 그룹화
    const grouped = {};
    projects.forEach(proj => {
      proj.categories.forEach(cat => {
        if (!grouped[cat]) grouped[cat] = [];
        grouped[cat].push(proj);
      });
    });

    // 7. 필터 버튼 생성
    const fixedGroups = ["NEW", "BEST", "Text", "Image Gen", "Image Edit", "Audio", "Video", "Productivity", "Utility", "Vision"];
    const filterGroupDiv = document.getElementById("filter-group");

    const allButton = document.createElement("button");
    allButton.className = "toggle-button active";
    allButton.setAttribute("data-filter", "all");
    allButton.textContent = "All";
    filterGroupDiv.appendChild(allButton);

    fixedGroups.forEach(category => {
      const btn = document.createElement("button");
      btn.className = "toggle-button";
      btn.setAttribute("data-filter", category);
      btn.textContent = category;
      filterGroupDiv.appendChild(btn);
    });

    // 8. 사이드바 갱신 함수
    function updateSidebar(filter) {
      const sidebar = document.getElementById("sidebar");
      sidebar.innerHTML = "";
      let items = (filter === "all")
        ? projects
        : projects.filter(p => p.categories.includes(filter));

      const ul = document.createElement("ul");
      items.forEach(item => {
        const li = document.createElement("li");

        // 이름 표시
        const nameSpan = document.createElement("span");
        nameSpan.textContent = item.name;
        li.appendChild(nameSpan);

        // "링크 클릭" 버튼
        const linkButton = document.createElement("button");
        linkButton.textContent = "링크 클릭";
        linkButton.addEventListener("click", (event) => {
          event.stopPropagation(); // li 클릭 이벤트와 구분
          window.open(item.url, "_blank"); // 새 탭(창) 열기
        });
        li.appendChild(linkButton);

        // li 자체 클릭하면 iframe 변경
        li.addEventListener("click", () => {
          document.getElementById("embed-frame").src = item.url;
        });

        ul.appendChild(li);
      });
      sidebar.appendChild(ul);

      if (items.length > 0) {
        document.getElementById("embed-frame").src = items[0].url;
      } else {
        document.getElementById("embed-frame").src = "";
      }
    }

    // 9. 버튼 클릭 이벤트
    document.querySelectorAll(".toggle-button").forEach(button => {
      button.addEventListener("click", function() {
        document.querySelectorAll(".toggle-button").forEach(b => b.classList.remove("active"));
        this.classList.add("active");
        updateSidebar(this.getAttribute("data-filter"));
      });
    });

    // 10. 페이지 로드 시 All 필터
    updateSidebar("all");
  </script>
</body>
</html>