File size: 33,563 Bytes
486004a
c26f143
 
 
e195ac6
 
 
a9e3b8d
c26f143
41d9eba
 
 
 
 
 
 
37fe9d3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41d9eba
 
fa9bc0c
47b7abe
 
41d9eba
1f9317b
47b7abe
41d9eba
 
 
fa9bc0c
47b7abe
1f9317b
 
 
 
47b7abe
1f9317b
 
41d9eba
 
47b7abe
 
41d9eba
 
47b7abe
 
41d9eba
47b7abe
1f9317b
 
41d9eba
 
 
 
 
 
47b7abe
 
 
41d9eba
47b7abe
 
41d9eba
 
 
 
 
47b7abe
41d9eba
fa9bc0c
41d9eba
 
 
 
 
47b7abe
41d9eba
 
 
 
 
 
 
 
47b7abe
 
 
41d9eba
 
 
 
 
 
 
 
 
 
fa9bc0c
41d9eba
1f9317b
41d9eba
 
 
47b7abe
41d9eba
 
 
fa9bc0c
41d9eba
 
 
 
 
 
 
 
 
 
 
fa9bc0c
41d9eba
 
 
 
 
fa9bc0c
41d9eba
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fa9bc0c
41d9eba
47b7abe
41d9eba
 
 
 
 
1f9317b
 
41d9eba
c26f143
 
 
 
 
486004a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
c26f143
 
 
5370608
 
 
 
 
 
 
 
 
 
cce8fbb
8ffa15c
5370608
cce8fbb
 
 
a9e3b8d
5370608
d0bb13d
cce8fbb
5370608
d0bb13d
 
 
 
 
 
 
 
 
 
cce8fbb
5370608
d0bb13d
 
5370608
d0bb13d
 
 
 
5370608
 
 
d0bb13d
 
 
5370608
d0bb13d
 
 
 
 
cce8fbb
d0bb13d
 
5370608
d0bb13d
 
 
 
 
 
 
5370608
 
 
 
 
d0bb13d
 
 
 
 
 
 
cce8fbb
5370608
 
cce8fbb
5370608
cce8fbb
 
 
d0bb13d
cce8fbb
d0bb13d
cce8fbb
 
 
 
 
 
 
 
 
 
 
 
d0bb13d
cce8fbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d0bb13d
cce8fbb
 
5370608
d0bb13d
 
 
 
 
 
 
cce8fbb
 
d0bb13d
62fc2dd
8ffa15c
cce8fbb
 
 
c26f143
5370608
 
d0bb13d
62fc2dd
 
8ffa15c
 
486004a
 
e44e7ed
62fc2dd
 
 
 
 
 
 
fb8428f
e44e7ed
 
62fc2dd
 
e195ac6
 
 
62fc2dd
 
 
 
 
 
 
e44e7ed
62fc2dd
e44e7ed
62fc2dd
 
 
e44e7ed
62fc2dd
e195ac6
e44e7ed
62fc2dd
486004a
 
e195ac6
e44e7ed
e195ac6
 
 
 
 
62fc2dd
e44e7ed
486004a
fb8428f
e195ac6
fb8428f
 
486004a
 
 
c26f143
e44e7ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fb8428f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
62fc2dd
 
8ffa15c
 
e195ac6
 
e44e7ed
e195ac6
 
62fc2dd
e44e7ed
 
 
 
 
62fc2dd
e195ac6
 
 
 
 
 
 
e44e7ed
 
 
 
 
e195ac6
 
 
 
 
 
 
 
 
 
e44e7ed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e195ac6
 
 
62fc2dd
 
 
e195ac6
62fc2dd
8ffa15c
62fc2dd
 
8ffa15c
486004a
62fc2dd
 
 
 
 
 
 
 
 
 
 
 
 
c26f143
62fc2dd
 
 
 
 
 
 
 
e195ac6
c26f143
41d9eba
486004a
e195ac6
47b7abe
 
e195ac6
486004a
fa9bc0c
5370608
 
 
486004a
fa9bc0c
41d9eba
 
 
 
e195ac6
cce8fbb
41d9eba
43dde8f
fa9bc0c
43dde8f
cce8fbb
486004a
41d9eba
5370608
 
41d9eba
5370608
486004a
 
 
43dde8f
fa9bc0c
5370608
43dde8f
41d9eba
 
486004a
cce8fbb
 
 
 
 
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
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
import gradio as gr
import requests
import pandas as pd
import plotly.graph_objects as go
from datetime import datetime
import os

HF_TOKEN = os.getenv("HF_TOKEN")

target_models = {
    "openfree/flux-lora-korea-palace": "https://huggingface.co/openfree/flux-lora-korea-palace",
    "seawolf2357/hanbok": "https://huggingface.co/seawolf2357/hanbok",
    "LGAI-EXAONE/EXAONE-3.5-32B-Instruct": "https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-32B-Instruct",
    "LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct": "https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-2.4B-Instruct",
    "LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct": "https://huggingface.co/LGAI-EXAONE/EXAONE-3.5-7.8B-Instruct",
    "ginipick/flux-lora-eric-cat": "https://huggingface.co/ginipick/flux-lora-eric-cat",
    "seawolf2357/flux-lora-car-rolls-royce": "https://huggingface.co/seawolf2357/flux-lora-car-rolls-royce",

"Saxo/Linkbricks-Horizon-AI-Korean-Gemma-2-sft-dpo-27B": "https://huggingface.co/Saxo/Linkbricks-Horizon-AI-Korean-Gemma-2-sft-dpo-27B",
"AALF/gemma-2-27b-it-SimPO-37K": "https://huggingface.co/AALF/gemma-2-27b-it-SimPO-37K",
"nbeerbower/mistral-nemo-wissenschaft-12B": "https://huggingface.co/nbeerbower/mistral-nemo-wissenschaft-12B",
"Saxo/Linkbricks-Horizon-AI-Korean-Mistral-Nemo-sft-dpo-12B": "https://huggingface.co/Saxo/Linkbricks-Horizon-AI-Korean-Mistral-Nemo-sft-dpo-12B",
"princeton-nlp/gemma-2-9b-it-SimPO": "https://huggingface.co/princeton-nlp/gemma-2-9b-it-SimPO",
"migtissera/Tess-v2.5-Gemma-2-27B-alpha": "https://huggingface.co/migtissera/Tess-v2.5-Gemma-2-27B-alpha",
"DeepMount00/Llama-3.1-8b-Ita": "https://huggingface.co/DeepMount00/Llama-3.1-8b-Ita",
"cognitivecomputations/dolphin-2.9.3-mistral-nemo-12b": "https://huggingface.co/cognitivecomputations/dolphin-2.9.3-mistral-nemo-12b",
"ai-human-lab/EEVE-Korean_Instruct-10.8B-expo": "https://huggingface.co/ai-human-lab/EEVE-Korean_Instruct-10.8B-expo",
"VAGOsolutions/Llama-3.1-SauerkrautLM-8b-Instruct": "https://huggingface.co/VAGOsolutions/Llama-3.1-SauerkrautLM-8b-Instruct",
"Saxo/Linkbricks-Horizon-AI-Korean-llama-3.1-sft-dpo-8B": "https://huggingface.co/Saxo/Linkbricks-Horizon-AI-Korean-llama-3.1-sft-dpo-8B",
"AIDX-ktds/ktdsbaseLM-v0.12-based-on-openchat3.5": "https://huggingface.co/AIDX-ktds/ktdsbaseLM-v0.12-based-on-openchat3.5",
"mlabonne/Daredevil-8B-abliterated": "https://huggingface.co/mlabonne/Daredevil-8B-abliterated",
"ENERGY-DRINK-LOVE/eeve_dpo-v3": "https://huggingface.co/ENERGY-DRINK-LOVE/eeve_dpo-v3",
"migtissera/Trinity-2-Codestral-22B": "https://huggingface.co/migtissera/Trinity-2-Codestral-22B",
"Saxo/Linkbricks-Horizon-AI-Korean-llama3.1-sft-rlhf-dpo-8B": "https://huggingface.co/Saxo/Linkbricks-Horizon-AI-Korean-llama3.1-sft-rlhf-dpo-8B",
"mlabonne/Daredevil-8B-abliterated-dpomix": "https://huggingface.co/mlabonne/Daredevil-8B-abliterated-dpomix",
"yanolja/EEVE-Korean-Instruct-10.8B-v1.0": "https://huggingface.co/yanolja/EEVE-Korean-Instruct-10.8B-v1.0",
"vicgalle/Configurable-Llama-3.1-8B-Instruct": "https://huggingface.co/vicgalle/Configurable-Llama-3.1-8B-Instruct",
"T3Q-LLM/T3Q-LLM1-sft1.0-dpo1.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM1-sft1.0-dpo1.0",
"Eurdem/Defne-llama3.1-8B": "https://huggingface.co/Eurdem/Defne-llama3.1-8B",
"BAAI/Infinity-Instruct-7M-Gen-Llama3_1-8B": "https://huggingface.co/BAAI/Infinity-Instruct-7M-Gen-Llama3_1-8B",
"BAAI/Infinity-Instruct-3M-0625-Llama3-8B": "https://huggingface.co/BAAI/Infinity-Instruct-3M-0625-Llama3-8B",
"T3Q-LLM/T3Q-LLM-sft1.0-dpo1.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM-sft1.0-dpo1.0",
"BAAI/Infinity-Instruct-7M-0729-Llama3_1-8B": "https://huggingface.co/BAAI/Infinity-Instruct-7M-0729-Llama3_1-8B",
"mightbe/EEVE-10.8B-Multiturn": "https://huggingface.co/mightbe/EEVE-10.8B-Multiturn",
"hyemijo/omed-llama3.1-8b": "https://huggingface.co/hyemijo/omed-llama3.1-8b",
"yanolja/Bookworm-10.7B-v0.4-DPO": "https://huggingface.co/yanolja/Bookworm-10.7B-v0.4-DPO",
"algograp-Inc/algograpV4": "https://huggingface.co/algograp-Inc/algograpV4",
"lightblue/suzume-llama-3-8B-multilingual-orpo-borda-top75": "https://huggingface.co/lightblue/suzume-llama-3-8B-multilingual-orpo-borda-top75",
"chihoonlee10/T3Q-LLM-MG-DPO-v1.0": "https://huggingface.co/chihoonlee10/T3Q-LLM-MG-DPO-v1.0",
"vicgalle/Configurable-Hermes-2-Pro-Llama-3-8B": "https://huggingface.co/vicgalle/Configurable-Hermes-2-Pro-Llama-3-8B",
"RLHFlow/LLaMA3-iterative-DPO-final": "https://huggingface.co/RLHFlow/LLaMA3-iterative-DPO-final",
"SEOKDONG/llama3.1_korean_v0.1_sft_by_aidx": "https://huggingface.co/SEOKDONG/llama3.1_korean_v0.1_sft_by_aidx",
"spow12/Ko-Qwen2-7B-Instruct": "https://huggingface.co/spow12/Ko-Qwen2-7B-Instruct",
"BAAI/Infinity-Instruct-3M-0625-Qwen2-7B": "https://huggingface.co/BAAI/Infinity-Instruct-3M-0625-Qwen2-7B",
"lightblue/suzume-llama-3-8B-multilingual-orpo-borda-half": "https://huggingface.co/lightblue/suzume-llama-3-8B-multilingual-orpo-borda-half",
"T3Q-LLM/T3Q-LLM1-CV-v2.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM1-CV-v2.0",
"migtissera/Trinity-2-Codestral-22B-v0.2": "https://huggingface.co/migtissera/Trinity-2-Codestral-22B-v0.2",
"sinjy1203/EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval": "https://huggingface.co/sinjy1203/EEVE-Korean-Instruct-10.8B-v1.0-Grade-Retrieval",
"MaziyarPanahi/Llama-3-8B-Instruct-v0.10": "https://huggingface.co/MaziyarPanahi/Llama-3-8B-Instruct-v0.10",
"MaziyarPanahi/Llama-3-8B-Instruct-v0.9": "https://huggingface.co/MaziyarPanahi/Llama-3-8B-Instruct-v0.9",
"zhengr/MixTAO-7Bx2-MoE-v8.1": "https://huggingface.co/zhengr/MixTAO-7Bx2-MoE-v8.1",
"TIGER-Lab/MAmmoTH2-8B-Plus": "https://huggingface.co/TIGER-Lab/MAmmoTH2-8B-Plus",
"OpenBuddy/openbuddy-qwen1.5-14b-v21.1-32k": "https://huggingface.co/OpenBuddy/openbuddy-qwen1.5-14b-v21.1-32k",
"haoranxu/Llama-3-Instruct-8B-CPO-SimPO": "https://huggingface.co/haoranxu/Llama-3-Instruct-8B-CPO-SimPO",
"Weyaxi/Einstein-v7-Qwen2-7B": "https://huggingface.co/Weyaxi/Einstein-v7-Qwen2-7B",
"DKYoon/kosolar-hermes-test": "https://huggingface.co/DKYoon/kosolar-hermes-test",
"vilm/Quyen-Pro-v0.1": "https://huggingface.co/vilm/Quyen-Pro-v0.1",
"chihoonlee10/T3Q-LLM-MG-v1.0": "https://huggingface.co/chihoonlee10/T3Q-LLM-MG-v1.0",
"lightblue/suzume-llama-3-8B-multilingual-orpo-borda-top25": "https://huggingface.co/lightblue/suzume-llama-3-8B-multilingual-orpo-borda-top25",
"ai-human-lab/EEVE-Korean-10.8B-RAFT": "https://huggingface.co/ai-human-lab/EEVE-Korean-10.8B-RAFT",
"princeton-nlp/Llama-3-Base-8B-SFT-RDPO": "https://huggingface.co/princeton-nlp/Llama-3-Base-8B-SFT-RDPO",
"MaziyarPanahi/Llama-3-8B-Instruct-v0.8": "https://huggingface.co/MaziyarPanahi/Llama-3-8B-Instruct-v0.8",
"chihoonlee10/T3Q-ko-solar-dpo-v7.0": "https://huggingface.co/chihoonlee10/T3Q-ko-solar-dpo-v7.0",
"jondurbin/bagel-8b-v1.0": "https://huggingface.co/jondurbin/bagel-8b-v1.0",
"DeepMount00/Llama-3-8b-Ita": "https://huggingface.co/DeepMount00/Llama-3-8b-Ita",
"VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct": "https://huggingface.co/VAGOsolutions/Llama-3-SauerkrautLM-8b-Instruct",
"princeton-nlp/Llama-3-Instruct-8B-ORPO-v0.2": "https://huggingface.co/princeton-nlp/Llama-3-Instruct-8B-ORPO-v0.2",
"AIDX-ktds/ktdsbaseLM-v0.11-based-on-openchat3.5": "https://huggingface.co/AIDX-ktds/ktdsbaseLM-v0.11-based-on-openchat3.5",
"princeton-nlp/Llama-3-Base-8B-SFT-KTO": "https://huggingface.co/princeton-nlp/Llama-3-Base-8B-SFT-KTO",
"maywell/Mini_Synatra_SFT": "https://huggingface.co/maywell/Mini_Synatra_SFT",
"princeton-nlp/Llama-3-Base-8B-SFT-ORPO": "https://huggingface.co/princeton-nlp/Llama-3-Base-8B-SFT-ORPO",
"princeton-nlp/Llama-3-Instruct-8B-CPO-v0.2": "https://huggingface.co/princeton-nlp/Llama-3-Instruct-8B-CPO-v0.2",
"spow12/Qwen2-7B-ko-Instruct-orpo-ver_2.0_wo_chat": "https://huggingface.co/spow12/Qwen2-7B-ko-Instruct-orpo-ver_2.0_wo_chat",
"princeton-nlp/Llama-3-Base-8B-SFT-DPO": "https://huggingface.co/princeton-nlp/Llama-3-Base-8B-SFT-DPO",
"princeton-nlp/Llama-3-Instruct-8B-ORPO": "https://huggingface.co/princeton-nlp/Llama-3-Instruct-8B-ORPO",
"lcw99/llama-3-10b-it-kor-extented-chang": "https://huggingface.co/lcw99/llama-3-10b-it-kor-extented-chang",
"migtissera/Llama-3-8B-Synthia-v3.5": "https://huggingface.co/migtissera/Llama-3-8B-Synthia-v3.5",
"megastudyedu/M-SOLAR-10.7B-v1.4-dpo": "https://huggingface.co/megastudyedu/M-SOLAR-10.7B-v1.4-dpo",
"T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM-solar10.8-sft-v1.0",
"maywell/Synatra-10.7B-v0.4": "https://huggingface.co/maywell/Synatra-10.7B-v0.4",
"nlpai-lab/KULLM3": "https://huggingface.co/nlpai-lab/KULLM3",
"abacusai/Llama-3-Smaug-8B": "https://huggingface.co/abacusai/Llama-3-Smaug-8B",
"gwonny/nox-solar-10.7b-v4-kolon-ITD-5-v2.1": "https://huggingface.co/gwonny/nox-solar-10.7b-v4-kolon-ITD-5-v2.1",
"BAAI/Infinity-Instruct-3M-0625-Mistral-7B": "https://huggingface.co/BAAI/Infinity-Instruct-3M-0625-Mistral-7B",
"openchat/openchat_3.5": "https://huggingface.co/openchat/openchat_3.5",
"T3Q-LLM/T3Q-LLM1-v2.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM1-v2.0",
"T3Q-LLM/T3Q-LLM1-CV-v1.0": "https://huggingface.co/T3Q-LLM/T3Q-LLM1-CV-v1.0",
"ONS-AI-RESEARCH/ONS-SOLAR-10.7B-v1.1": "https://huggingface.co/ONS-AI-RESEARCH/ONS-SOLAR-10.7B-v1.1",
"macadeliccc/Samantha-Qwen-2-7B": "https://huggingface.co/macadeliccc/Samantha-Qwen-2-7B",
"openchat/openchat-3.5-0106": "https://huggingface.co/openchat/openchat-3.5-0106",
"NousResearch/Nous-Hermes-2-SOLAR-10.7B": "https://huggingface.co/NousResearch/Nous-Hermes-2-SOLAR-10.7B",
"UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter1": "https://huggingface.co/UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter1",
"MTSAIR/multi_verse_model": "https://huggingface.co/MTSAIR/multi_verse_model",
"gwonny/nox-solar-10.7b-v4-kolon-ITD-5-v2.0": "https://huggingface.co/gwonny/nox-solar-10.7b-v4-kolon-ITD-5-v2.0",
"VIRNECT/llama-3-Korean-8B": "https://huggingface.co/VIRNECT/llama-3-Korean-8B",
"ENERGY-DRINK-LOVE/SOLAR_merge_DPOv3": "https://huggingface.co/ENERGY-DRINK-LOVE/SOLAR_merge_DPOv3",
"SeaLLMs/SeaLLMs-v3-7B-Chat": "https://huggingface.co/SeaLLMs/SeaLLMs-v3-7B-Chat",
"VIRNECT/llama-3-Korean-8B-V2": "https://huggingface.co/VIRNECT/llama-3-Korean-8B-V2",
"MLP-KTLim/llama-3-Korean-Bllossom-8B": "https://huggingface.co/MLP-KTLim/llama-3-Korean-Bllossom-8B",
"Magpie-Align/Llama-3-8B-Magpie-Align-v0.3": "https://huggingface.co/Magpie-Align/Llama-3-8B-Magpie-Align-v0.3",
"cognitivecomputations/Llama-3-8B-Instruct-abliterated-v2": "https://huggingface.co/cognitivecomputations/Llama-3-8B-Instruct-abliterated-v2",
"SkyOrbis/SKY-Ko-Llama3-8B-lora": "https://huggingface.co/SkyOrbis/SKY-Ko-Llama3-8B-lora",
"4yo1/llama3-eng-ko-8b-sl5": "https://huggingface.co/4yo1/llama3-eng-ko-8b-sl5",
"kimwooglae/WebSquareAI-Instruct-llama-3-8B-v0.5.39": "https://huggingface.co/kimwooglae/WebSquareAI-Instruct-llama-3-8B-v0.5.39",
"ONS-AI-RESEARCH/ONS-SOLAR-10.7B-v1.2": "https://huggingface.co/ONS-AI-RESEARCH/ONS-SOLAR-10.7B-v1.2",
"lcw99/llama-3-10b-it-kor-extented-chang-pro8": "https://huggingface.co/lcw99/llama-3-10b-it-kor-extented-chang-pro8",
"BAAI/Infinity-Instruct-3M-0625-Yi-1.5-9B": "https://huggingface.co/BAAI/Infinity-Instruct-3M-0625-Yi-1.5-9B",
"migtissera/Tess-2.0-Llama-3-8B": "https://huggingface.co/migtissera/Tess-2.0-Llama-3-8B",
"BAAI/Infinity-Instruct-3M-0613-Mistral-7B": "https://huggingface.co/BAAI/Infinity-Instruct-3M-0613-Mistral-7B",
"yeonwoo780/cydinfo-llama3-8b-lora-v01": "https://huggingface.co/yeonwoo780/cydinfo-llama3-8b-lora-v01",
"vicgalle/ConfigurableSOLAR-10.7B": "https://huggingface.co/vicgalle/ConfigurableSOLAR-10.7B",
"chihoonlee10/T3Q-ko-solar-jo-v1.0": "https://huggingface.co/chihoonlee10/T3Q-ko-solar-jo-v1.0",
"Kukedlc/NeuralLLaMa-3-8b-ORPO-v0.4": "https://huggingface.co/Kukedlc/NeuralLLaMa-3-8b-ORPO-v0.4",
"Edentns/DataVortexS-10.7B-dpo-v1.0": "https://huggingface.co/Edentns/DataVortexS-10.7B-dpo-v1.0",
"SJ-Donald/SJ-SOLAR-10.7b-DPO": "https://huggingface.co/SJ-Donald/SJ-SOLAR-10.7b-DPO",
"lemon-mint/gemma-ko-7b-it-v0.40": "https://huggingface.co/lemon-mint/gemma-ko-7b-it-v0.40",
"GyuHyeonWkdWkdMan/naps-llama-3.1-8b-instruct-v0.3": "https://huggingface.co/GyuHyeonWkdWkdMan/naps-llama-3.1-8b-instruct-v0.3",
"hyeogi/SOLAR-10.7B-v1.5": "https://huggingface.co/hyeogi/SOLAR-10.7B-v1.5",
"etri-xainlp/llama3-8b-dpo_v1": "https://huggingface.co/etri-xainlp/llama3-8b-dpo_v1",
"LDCC/LDCC-SOLAR-10.7B": "https://huggingface.co/LDCC/LDCC-SOLAR-10.7B",
"chlee10/T3Q-Llama3-8B-Inst-sft1.0": "https://huggingface.co/chlee10/T3Q-Llama3-8B-Inst-sft1.0",
"lemon-mint/gemma-ko-7b-it-v0.41": "https://huggingface.co/lemon-mint/gemma-ko-7b-it-v0.41",
"chlee10/T3Q-Llama3-8B-sft1.0-dpo1.0": "https://huggingface.co/chlee10/T3Q-Llama3-8B-sft1.0-dpo1.0",
"maywell/Synatra-7B-Instruct-v0.3-pre": "https://huggingface.co/maywell/Synatra-7B-Instruct-v0.3-pre",
"UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter2": "https://huggingface.co/UCLA-AGI/Llama-3-Instruct-8B-SPPO-Iter2",
"hwkwon/S-SOLAR-10.7B-v1.4": "https://huggingface.co/hwkwon/S-SOLAR-10.7B-v1.4"
    
    
    
}

def get_models_data(progress=gr.Progress()):
    """λͺ¨λΈ 데이터 κ°€μ Έμ˜€κΈ°"""
    url = "https://huggingface.co/api/models"
    params = {
        'full': 'true',
        'limit': 300  # μŠ€νŽ˜μ΄μŠ€μ™€ λ™μΌν•˜κ²Œ 300개둜 μ„€μ •
    }
    
    try:
        progress(0, desc="Fetching models data...")
        response = requests.get(url, params=params)
        
        if response.status_code != 200:
            print(f"API μš”μ²­ μ‹€νŒ¨: {response.status_code}")
            print(f"Response: {response.text}")
            print(f"URL: {url}")
            return create_error_plot(), "<div>λͺ¨λΈ 데이터λ₯Ό κ°€μ Έμ˜€λŠ”λ° μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€.</div>", pd.DataFrame()
        
        all_models = response.json()
        
        # target_models에 μžˆλŠ” λͺ¨λΈλ§Œ 필터링
        filtered_models = []
        for model in all_models:
            if model.get('id', '') in target_models:
                model['rank'] = len(filtered_models) + 1
                filtered_models.append(model)
        
        if not filtered_models:
            return create_error_plot(), "<div>μ„ νƒλœ λͺ¨λΈμ˜ 데이터λ₯Ό 찾을 수 μ—†μŠ΅λ‹ˆλ‹€.</div>", pd.DataFrame()
        
        progress(0.3, desc="Creating visualization...")
        
        # μ‹œκ°ν™” 생성
        fig = go.Figure()
        
        # 데이터 μ€€λΉ„
        ids = [model['id'] for model in filtered_models]
        ranks = [model['rank'] for model in filtered_models]
        likes = [model.get('likes', 0) for model in filtered_models]
        
        # YμΆ• 값을 λ°˜μ „ (300 - rank + 1)
        y_values = [301 - r for r in ranks]
        
        # λ§‰λŒ€ κ·Έλž˜ν”„ 생성
        fig.add_trace(go.Bar(
            x=ids,
            y=y_values,
            text=[f"Rank: {r}<br>Likes: {l}" for r, l in zip(ranks, likes)],
            textposition='auto',
            marker_color='rgb(158,202,225)',
            opacity=0.8
        ))
        
        fig.update_layout(
            title={
                'text': 'Hugging Face Models Rankings (Top 300)',
                'y':0.95,
                'x':0.5,
                'xanchor': 'center',
                'yanchor': 'top'
            },
            xaxis_title='Model ID',
            yaxis_title='Rank',
            yaxis=dict(
                ticktext=[str(i) for i in range(1, 301, 20)],
                tickvals=[301 - i for i in range(1, 301, 20)],
                range=[0, 300]
            ),
            height=800,
            showlegend=False,
            template='plotly_white',
            xaxis_tickangle=-45
        )
        
        progress(0.6, desc="Creating model cards...")
        
        # HTML μΉ΄λ“œ 생성
        html_content = """
        <div style='padding: 20px; background: #f5f5f5;'>
            <h2 style='color: #2c3e50;'>Models Rankings</h2>
            <div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;'>
        """
        
        for model in filtered_models:
            model_id = model.get('id', '')
            rank = model.get('rank', 'N/A')
            likes = model.get('likes', 0)
            downloads = model.get('downloads', 0)
            
            html_content += f"""
            <div style='
                background: white;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                transition: transform 0.2s;
            '>
                <h3 style='color: #34495e;'>Rank #{rank} - {model_id}</h3>
                <p style='color: #7f8c8d;'>πŸ‘ Likes: {likes}</p>
                <p style='color: #7f8c8d;'>⬇️ Downloads: {downloads}</p>
                <a href='{target_models[model_id]}' 
                   target='_blank' 
                   style='
                    display: inline-block;
                    padding: 8px 16px;
                    background: #3498db;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                    transition: background 0.3s;
                   '>
                   Visit Model πŸ”—
                </a>
            </div>
            """
        
        html_content += "</div></div>"
        
        # λ°μ΄ν„°ν”„λ ˆμž„ 생성
        df = pd.DataFrame([{
            'Rank': model.get('rank', 'N/A'),
            'Model ID': model.get('id', ''),
            'Likes': model.get('likes', 'N/A'),
            'Downloads': model.get('downloads', 'N/A'),
            'URL': target_models[model.get('id', '')]
        } for model in filtered_models])
        
        progress(1.0, desc="Complete!")
        return fig, html_content, df
        
    except Exception as e:
        print(f"Error in get_models_data: {str(e)}")
        return create_error_plot(), f"<div>μ—λŸ¬ λ°œμƒ: {str(e)}</div>", pd.DataFrame()
        
# 관심 슀페이슀 URL λ¦¬μŠ€νŠΈμ™€ 정보
target_spaces = {
    "ginipick/FLUXllama": "https://huggingface.co/spaces/ginipick/FLUXllama",
    "ginipick/SORA-3D": "https://huggingface.co/spaces/ginipick/SORA-3D",
    "fantaxy/Sound-AI-SFX": "https://huggingface.co/spaces/fantaxy/Sound-AI-SFX",
    "fantos/flx8lora": "https://huggingface.co/spaces/fantos/flx8lora",
    "ginigen/Canvas": "https://huggingface.co/spaces/ginigen/Canvas",
    "fantaxy/erotica": "https://huggingface.co/spaces/fantaxy/erotica",
    "ginipick/time-machine": "https://huggingface.co/spaces/ginipick/time-machine",
    "aiqcamp/FLUX-VisionReply": "https://huggingface.co/spaces/aiqcamp/FLUX-VisionReply",
    "openfree/Tetris-Game": "https://huggingface.co/spaces/openfree/Tetris-Game",
    "openfree/everychat": "https://huggingface.co/spaces/openfree/everychat",
    "VIDraft/mouse1": "https://huggingface.co/spaces/VIDraft/mouse1",
    "kolaslab/alpha-go": "https://huggingface.co/spaces/kolaslab/alpha-go",
    "ginipick/text3d": "https://huggingface.co/spaces/ginipick/text3d",
    "openfree/trending-board": "https://huggingface.co/spaces/openfree/trending-board",
    "cutechicken/tankwar": "https://huggingface.co/spaces/cutechicken/tankwar",
    "openfree/game-jewel": "https://huggingface.co/spaces/openfree/game-jewel",
    "VIDraft/mouse-chat": "https://huggingface.co/spaces/VIDraft/mouse-chat",
    "ginipick/AccDiffusion": "https://huggingface.co/spaces/ginipick/AccDiffusion",
    "aiqtech/Particle-Accelerator-Simulation": "https://huggingface.co/spaces/aiqtech/Particle-Accelerator-Simulation",
    "openfree/GiniGEN": "https://huggingface.co/spaces/openfree/GiniGEN",
    "kolaslab/3DAudio-Spectrum-Analyzer": "https://huggingface.co/spaces/kolaslab/3DAudio-Spectrum-Analyzer",
    "openfree/trending-news-24": "https://huggingface.co/spaces/openfree/trending-news-24",
    "ginipick/Realtime-FLUX": "https://huggingface.co/spaces/ginipick/Realtime-FLUX",
    "VIDraft/prime-number": "https://huggingface.co/spaces/VIDraft/prime-number",
    "kolaslab/zombie-game": "https://huggingface.co/spaces/kolaslab/zombie-game",
    "fantos/miro-game": "https://huggingface.co/spaces/fantos/miro-game",
    "kolaslab/shooting": "https://huggingface.co/spaces/kolaslab/shooting",
    "VIDraft/Mouse-Hackathon": "https://huggingface.co/spaces/VIDraft/Mouse-Hackathon",
    "upstage/open-ko-llm-leaderboard": "https://huggingface.co/spaces/upstage/open-ko-llm-leaderboard",
    "LGAI-EXAONE/EXAONE-3.5-Instruct-Demo": "https://huggingface.co/spaces/LGAI-EXAONE/EXAONE-3.5-Instruct-Demo",
    "NCSOFT/VARCO_Arena": "https://huggingface.co/spaces/NCSOFT/VARCO_Arena"
}

def get_spaces_data(sort_type="trending", progress=gr.Progress()):
    """슀페이슀 데이터 κ°€μ Έμ˜€κΈ° (trending λ˜λŠ” modes)"""
    url = f"https://huggingface.co/api/spaces"
    params = {
        'full': 'true',
        'limit': 300
    }
    
    if sort_type == "modes":
        params['sort'] = 'likes'  # modesλŠ” μ’‹μ•„μš” 순으둜 μ •λ ¬
    
    try:
        progress(0, desc=f"Fetching {sort_type} spaces data...")
        response = requests.get(url, params=params)
        response.raise_for_status()
        all_spaces = response.json()
        
        # μˆœμœ„ 정보 μ €μž₯
        space_ranks = {space['id']: idx + 1 for idx, space in enumerate(all_spaces)}
        
        # target_spaces 필터링 및 μˆœμœ„ 정보 포함
        spaces = []
        for space in all_spaces:
            if space.get('id', '') in target_spaces:
                space['rank'] = space_ranks.get(space['id'], 'N/A')
                spaces.append(space)
        
        # μˆœμœ„λ³„λ‘œ μ •λ ¬
        spaces.sort(key=lambda x: x['rank'])
        
        progress(0.3, desc="Creating visualization...")
        
        # μ‹œκ°ν™” 생성
        fig = go.Figure()
        
        # 데이터 μ€€λΉ„
        ids = [space['id'] for space in spaces]
        ranks = [space['rank'] for space in spaces]
        likes = [space.get('likes', 0) for space in spaces]
        
        # YμΆ• 값을 λ°˜μ „ (300 - rank + 1)
        y_values = [301 - r for r in ranks]  # μˆœμœ„λ₯Ό λ°˜μ „λœ κ°’μœΌλ‘œ λ³€ν™˜
        
        # λ§‰λŒ€ κ·Έλž˜ν”„ 생성
        fig.add_trace(go.Bar(
            x=ids,
            y=y_values,
            text=[f"Rank: {r}<br>Likes: {l}" for r, l in zip(ranks, likes)],
            textposition='auto',
            marker_color='rgb(158,202,225)',
            opacity=0.8
        ))
        
        fig.update_layout(
            title={
                'text': f'Hugging Face Spaces {sort_type.title()} Rankings (Top 300)',
                'y':0.95,
                'x':0.5,
                'xanchor': 'center',
                'yanchor': 'top'
            },
            xaxis_title='Space ID',
            yaxis_title='Rank',
            yaxis=dict(
                ticktext=[str(i) for i in range(1, 301, 20)],  # 1λΆ€ν„° 300κΉŒμ§€ 20 간격
                tickvals=[301 - i for i in range(1, 301, 20)],  # λ°˜μ „λœ κ°’
                range=[0, 300]  # yμΆ• λ²”μœ„ μ„€μ •
            ),
            height=800,
            showlegend=False,
            template='plotly_white',
            xaxis_tickangle=-45
        )
        
        progress(0.6, desc="Creating space cards...")
        
        # HTML μΉ΄λ“œ 생성
        html_content = f"""
        <div style='padding: 20px; background: #f5f5f5;'>
            <h2 style='color: #2c3e50;'>{sort_type.title()} Rankings</h2>
            <div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;'>
        """
        
        for space in spaces:
            space_id = space.get('id', '')
            rank = space.get('rank', 'N/A')
            likes = space.get('likes', 0)
            title = space.get('title', 'No Title')
            description = space.get('description', 'No Description')[:100]
            
            html_content += f"""
            <div style='
                background: white;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                transition: transform 0.2s;
            '>
                <h3 style='color: #34495e;'>Rank #{rank} - {space_id}</h3>
                <p style='color: #7f8c8d;'>πŸ‘ Likes: {likes}</p>
                <p style='color: #2c3e50;'>{title}</p>
                <p style='color: #7f8c8d; font-size: 0.9em;'>{description}...</p>
                <a href='{target_spaces[space_id]}' 
                   target='_blank' 
                   style='
                    display: inline-block;
                    padding: 8px 16px;
                    background: #3498db;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                    transition: background 0.3s;
                   '>
                   Visit Space πŸ”—
                </a>
            </div>
            """
        
        html_content += "</div></div>"
        
        # λ°μ΄ν„°ν”„λ ˆμž„ 생성
        df = pd.DataFrame([{
            'Rank': space.get('rank', 'N/A'),
            'Space ID': space.get('id', ''),
            'Likes': space.get('likes', 'N/A'),
            'Title': space.get('title', 'N/A'),
            'URL': target_spaces[space.get('id', '')]
        } for space in spaces])
        
        progress(1.0, desc="Complete!")
        return fig, html_content, df
        
    except Exception as e:
        error_html = f'<div style="color: red; padding: 20px;">Error: {str(e)}</div>'
        error_plot = create_error_plot()
        return error_plot, error_html, pd.DataFrame()




def create_trend_visualization(spaces_data):
    if not spaces_data:
        return create_error_plot()
    
    fig = go.Figure()
    
    # μˆœμœ„ 데이터 μ€€λΉ„
    ranks = []
    for idx, space in enumerate(spaces_data, 1):
        space_id = space.get('id', '')
        if space_id in target_spaces:
            ranks.append({
                'id': space_id,
                'rank': idx,
                'likes': space.get('likes', 0),
                'title': space.get('title', 'N/A'),
                'views': space.get('views', 0)
            })
    
    if not ranks:
        return create_error_plot()
    
    # μˆœμœ„λ³„λ‘œ μ •λ ¬
    ranks.sort(key=lambda x: x['rank'])
    
    # ν”Œλ‘― 데이터 생성
    ids = [r['id'] for r in ranks]
    rank_values = [r['rank'] for r in ranks]
    likes = [r['likes'] for r in ranks]
    views = [r['views'] for r in ranks]
    
    # λ§‰λŒ€ κ·Έλž˜ν”„ 생성
    fig.add_trace(go.Bar(
        x=ids,
        y=rank_values,
        text=[f"Rank: {r}<br>Likes: {l}<br>Views: {v}" for r, l, v in zip(rank_values, likes, views)],
        textposition='auto',
        marker_color='rgb(158,202,225)',
        opacity=0.8
    ))
    
    fig.update_layout(
        title={
            'text': 'Current Trending Ranks (All Target Spaces)',
            'y':0.95,
            'x':0.5,
            'xanchor': 'center',
            'yanchor': 'top'
        },
        xaxis_title='Space ID',
        yaxis_title='Trending Rank',
        yaxis_autorange='reversed',
        height=800,
        showlegend=False,
        template='plotly_white',
        xaxis_tickangle=-45
    )
    
    return fig

# 토큰이 μ—†λŠ” 경우λ₯Ό μœ„ν•œ λŒ€μ²΄ ν•¨μˆ˜
def get_trending_spaces_without_token():
    try:
        url = "https://huggingface.co/api/spaces"
        params = {
            'sort': 'likes',
            'direction': -1,
            'limit': 1000,
            'full': 'true'
        }
        
        response = requests.get(url, params=params)
        
        if response.status_code == 200:
            return response.json()
        else:
            print(f"API μš”μ²­ μ‹€νŒ¨ (토큰 μ—†μŒ): {response.status_code}")
            print(f"Response: {response.text}")
            return None
    except Exception as e:
        print(f"API 호좜 쀑 μ—λŸ¬ λ°œμƒ (토큰 μ—†μŒ): {str(e)}")
        return None

# API 토큰 μ„€μ • 및 ν•¨μˆ˜ 선택
if not HF_TOKEN:
    get_trending_spaces = get_trending_spaces_without_token



def create_error_plot():
    fig = go.Figure()
    fig.add_annotation(
        text="데이터λ₯Ό 뢈러올 수 μ—†μŠ΅λ‹ˆλ‹€.\n(API 인증이 ν•„μš”ν•©λ‹ˆλ‹€)",
        xref="paper",
        yref="paper",
        x=0.5,
        y=0.5,
        showarrow=False,
        font=dict(size=20)
    )
    fig.update_layout(
        title="Error Loading Data",
        height=400
    )
    return fig


def create_space_info_html(spaces_data):
    if not spaces_data:
        return "<div style='padding: 20px;'><h2>데이터λ₯Ό λΆˆλŸ¬μ˜€λŠ”λ° μ‹€νŒ¨ν–ˆμŠ΅λ‹ˆλ‹€.</h2></div>"
    
    html_content = """
    <div style='padding: 20px;'>
    <h2 style='color: #2c3e50;'>Current Trending Rankings</h2>
    <div style='display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px;'>
    """
    
    # λͺ¨λ“  target spacesλ₯Ό ν¬ν•¨ν•˜λ„λ‘ μˆ˜μ •
    for space_id in target_spaces.keys():
        space_info = next((s for s in spaces_data if s.get('id') == space_id), None)
        if space_info:
            rank = next((idx for idx, s in enumerate(spaces_data, 1) if s.get('id') == space_id), 'N/A')
            html_content += f"""
            <div style='
                background: white;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
                transition: transform 0.2s;
            '>
                <h3 style='color: #34495e;'>#{rank} - {space_id}</h3>
                <p style='color: #7f8c8d;'>πŸ‘ Likes: {space_info.get('likes', 'N/A')}</p>
                <p style='color: #7f8c8d;'>πŸ‘€ Views: {space_info.get('views', 'N/A')}</p>
                <p style='color: #2c3e50;'>{space_info.get('title', 'N/A')}</p>
                <p style='color: #7f8c8d; font-size: 0.9em;'>{space_info.get('description', 'N/A')[:100]}...</p>
                <a href='{target_spaces[space_id]}' 
                   target='_blank' 
                   style='
                    display: inline-block;
                    padding: 8px 16px;
                    background: #3498db;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                    transition: background 0.3s;
                   '>
                   Visit Space πŸ”—
                </a>
            </div>
            """
        else:
            html_content += f"""
            <div style='
                background: #f8f9fa;
                padding: 20px;
                border-radius: 10px;
                box-shadow: 0 2px 4px rgba(0,0,0,0.1);
            '>
                <h3 style='color: #34495e;'>{space_id}</h3>
                <p style='color: #7f8c8d;'>Not in trending</p>
                <a href='{target_spaces[space_id]}' 
                   target='_blank' 
                   style='
                    display: inline-block;
                    padding: 8px 16px;
                    background: #95a5a6;
                    color: white;
                    text-decoration: none;
                    border-radius: 5px;
                   '>
                   Visit Space πŸ”—
                </a>
            </div>
            """
    
    html_content += "</div></div>"
    return html_content

def create_data_table(spaces_data):
    if not spaces_data:
        return pd.DataFrame()
    
    rows = []
    for idx, space in enumerate(spaces_data, 1):
        space_id = space.get('id', '')
        if space_id in target_spaces:
            rows.append({
                'Rank': idx,
                'Space ID': space_id,
                'Likes': space.get('likes', 'N/A'),
                'Title': space.get('title', 'N/A'),
                'URL': target_spaces[space_id]
            })
    
    return pd.DataFrame(rows)

def refresh_data():
    spaces_data = get_trending_spaces()
    if spaces_data:
        plot = create_trend_visualization(spaces_data)
        info = create_space_info_html(spaces_data)
        df = create_data_table(spaces_data)
        return plot, info, df
    else:
        return create_error_plot(), "<div>API 인증이 ν•„μš”ν•©λ‹ˆλ‹€.</div>", pd.DataFrame()


with gr.Blocks(theme=gr.themes.Soft()) as demo:
    gr.Markdown("""
    # πŸ€— ν—ˆκΉ…νŽ˜μ΄μŠ€ 'ν•œκ΅­ λ¦¬λ”λ³΄λ“œ'
    μ‹€μ‹œκ°„μœΌλ‘œ Hugging Face의 Spaces와 Models 인기 μˆœμœ„λ₯Ό λΆ„μ„ν•©λ‹ˆλ‹€. μ‹ κ·œ 등둝 μš”μ²­: arxivgpt@gmail.com
    """)
    
    with gr.Tab("Spaces Trending"):
        trending_plot = gr.Plot()
        trending_info = gr.HTML()
        trending_df = gr.DataFrame()
    
    with gr.Tab("Models Trending"):
        models_plot = gr.Plot()
        models_info = gr.HTML()
        models_df = gr.DataFrame()
    
    refresh_btn = gr.Button("πŸ”„ Refresh Data", variant="primary")
    
    def refresh_all_data():
        spaces_results = get_spaces_data("trending")
        models_results = get_models_data()
        return [*spaces_results, *models_results]
    
    refresh_btn.click(
        refresh_all_data,
        outputs=[
            trending_plot, trending_info, trending_df,
            models_plot, models_info, models_df
        ]
    )
    
    # 초기 데이터 λ‘œλ“œ
    spaces_results = get_spaces_data("trending")
    models_results = get_models_data()
    
    trending_plot.value, trending_info.value, trending_df.value = spaces_results
    models_plot.value, models_info.value, models_df.value = models_results
    
# Gradio μ•± μ‹€ν–‰
demo.launch(
    server_name="0.0.0.0",
    server_port=7860,
    share=False
)