enzostvs HF staff commited on
Commit
b34e9b1
β€’
1 Parent(s): 5bf413b

models filters + search

Browse files
src/lib/cards.json CHANGED
@@ -18,7 +18,7 @@
18
  }
19
  ],
20
  "id": "0",
21
- "model_name": "CommunityCard",
22
  "prompt": "What is your favorite color?",
23
  "image": "https://picsum.photos/seed/0/500/500"
24
  },
 
18
  }
19
  ],
20
  "id": "0",
21
+ "model_name": "community-models-name-SDXL",
22
  "prompt": "What is your favorite color?",
23
  "image": "https://picsum.photos/seed/0/500/500"
24
  },
src/lib/components/fields/Input.svelte CHANGED
@@ -1,7 +1,20 @@
1
  <script lang="ts">
2
  export let placeholder: string = "Search";
 
 
 
 
 
 
 
3
  </script>
4
 
5
  <div class="bg-neutral-900 border border-neutral-800 rounded-lg px-4 py-3 text-neutral-200 text-base">
6
- <input type="text" {placeholder} class="bg-transparent outline-none border-none placeholder:text-neutral-500 w-full">
 
 
 
 
 
 
7
  </div>
 
1
  <script lang="ts">
2
  export let placeholder: string = "Search";
3
+ export let value: string = "";
4
+ export let onChange: (value: string) => void = () => {};
5
+
6
+ const handleChange = (event: any) => {
7
+ const target = event.target as HTMLInputElement;
8
+ onChange(target.value as string);
9
+ }
10
  </script>
11
 
12
  <div class="bg-neutral-900 border border-neutral-800 rounded-lg px-4 py-3 text-neutral-200 text-base">
13
+ <input
14
+ type="text"
15
+ {value}
16
+ {placeholder}
17
+ class="bg-transparent outline-none border-none placeholder:text-neutral-500 w-full"
18
+ on:input={handleChange}
19
+ >
20
  </div>
src/lib/components/models/Card.svelte CHANGED
@@ -1,14 +1,13 @@
1
  <script lang="ts">
2
- import type { CommunityCard } from "$lib/type";
3
  import Button from "$lib/components/Button.svelte";
4
  import Icon from "@iconify/svelte";
5
 
6
- export let card: CommunityCard;
7
 
8
  </script>
9
-
10
  <div
11
- class="cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
12
  >
13
  <div class="w-full h-[250px] relative z-[1] mb-3 overflow-hidden">
14
  <div class="w-full h-full bg-center bg-cover rounded-lg" style="background-image: url('{card.image}');"></div>
@@ -18,11 +17,17 @@
18
  </Button>
19
  </div>
20
  </div>
21
- <div class="flex items-center justify-between w-full">
22
- <p class="text-white font-semibold text-base mb-1">{card.model_name}</p>
23
- <div class="text-white text-sm flex items-center justify-end gap-1.5">
24
- <Icon icon="solar:heart-bold" class="w-5 h-5 text-red-500" />
25
- 234
 
 
 
 
 
 
26
  </div>
27
  </div>
28
  </div>
 
1
  <script lang="ts">
2
+ import type { ModelCard } from "$lib/type";
3
  import Button from "$lib/components/Button.svelte";
4
  import Icon from "@iconify/svelte";
5
 
6
+ export let card: ModelCard;
7
 
8
  </script>
 
9
  <div
10
+ class="w-full cursor-pointer group bg-neutral-900 rounded-xl relative flex items-start justify-between flex-col p-3 border border-neutral-800 transition-all duration-200 brightness-75 hover:brightness-100 z-[1]"
11
  >
12
  <div class="w-full h-[250px] relative z-[1] mb-3 overflow-hidden">
13
  <div class="w-full h-full bg-center bg-cover rounded-lg" style="background-image: url('{card.image}');"></div>
 
17
  </Button>
18
  </div>
19
  </div>
20
+ <div class="flex items-center justify-between w-full gap-4">
21
+ <p class="text-white font-semibold text-base mb-1 truncate">{card?.title ?? card?.repo}</p>
22
+ <div class="flex items-center justify-end gap-3">
23
+ <div class="text-white text-sm flex items-center justify-end gap-1.5">
24
+ <Icon icon="solar:heart-bold" class="w-5 h-5 text-red-500" />
25
+ {card.likes ?? 0}
26
+ </div>
27
+ <div class="text-white text-sm flex items-center justify-end gap-1.5">
28
+ <Icon icon="solar:download-square-bold" class="w-5 h-5 text-blue-500" />
29
+ {card.downloads ?? 0}
30
+ </div>
31
  </div>
32
  </div>
33
  </div>
src/lib/components/sidebar/Sidebar.svelte CHANGED
@@ -29,10 +29,10 @@
29
  }]
30
  </script>
31
 
32
- <button class="bg-transparent absolute top-10 right-8 cursor-pointer lg:hidden" on:click="{handleClick}">
33
  <Icon icon="{isOpen ? "mdi:hamburger-remove" : "mdi:hamburger-minus"}" class="w-7 h-7 text-white" />
34
  </button>
35
- <aside class="bg-neutral-950 h-screen border-r border-neutral-800 w-full max-w-[344px] absolute -translate-x-full lg:translate-x-0 transition-all duration-200 lg:relative z-20 lg:z-0 flex flex-col justify-between" class:translate-x-0={isOpen}>
36
  <div class="w-full">
37
  <header class="text-white px-8 pb-8 pt-10 text-xl tracking-wider font-semibold">
38
  LoRA Studio
 
29
  }]
30
  </script>
31
 
32
+ <button class="bg-transparent absolute top-10 right-8 cursor-pointer xl:hidden" on:click="{handleClick}">
33
  <Icon icon="{isOpen ? "mdi:hamburger-remove" : "mdi:hamburger-minus"}" class="w-7 h-7 text-white" />
34
  </button>
35
+ <aside class="bg-neutral-950 h-screen border-r border-neutral-800 w-full max-w-[344px] absolute -translate-x-full xl:translate-x-0 transition-all duration-200 xl:relative z-20 xl:z-0 flex flex-col justify-between" class:translate-x-0={isOpen}>
36
  <div class="w-full">
37
  <header class="text-white px-8 pb-8 pt-10 text-xl tracking-wider font-semibold">
38
  LoRA Studio
src/lib/type.ts CHANGED
@@ -13,6 +13,17 @@ export interface CommunityCard {
13
  image: string,
14
  }
15
 
 
 
 
 
 
 
 
 
 
 
 
16
  export interface ReactionType {
17
  emoji: string
18
  users: string[]
 
13
  image: string,
14
  }
15
 
16
+ export interface ModelCard {
17
+ repo: string;
18
+ title: string;
19
+ trigger_word: string;
20
+ is_compatible: boolean;
21
+ image: string;
22
+ weights: string;
23
+ likes: number;
24
+ downloads?: number;
25
+ }
26
+
27
  export interface ReactionType {
28
  emoji: string
29
  users: string[]
src/lib/utils/index.ts CHANGED
@@ -24,7 +24,7 @@ export const MODELS_FILTER_OPTIONS = [
24
  },
25
  {
26
  label: "Hotest",
27
- value: "hot",
28
  icon: "ph:fire-bold",
29
  iconColor: "text-orange-500"
30
  },
 
24
  },
25
  {
26
  label: "Hotest",
27
+ value: "hotest",
28
  icon: "ph:fire-bold",
29
  iconColor: "text-orange-500"
30
  },
src/lib/utils/loras.json ADDED
@@ -0,0 +1,583 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "image": "https://huggingface.co/ProomptEngineer/pe-balloon-diffusion-style/resolve/main/2095176.jpeg",
4
+ "title": "PE Balloon Diffusion",
5
+ "repo": "ProomptEngineer/pe-balloon-diffusion-style",
6
+ "trigger_word": "PEBalloonStyle",
7
+ "weights": "PE_BalloonStyle.safetensors",
8
+ "is_compatible": true,
9
+ "likes": 2,
10
+ "downloads": 0
11
+ },
12
+ {
13
+ "image": "https://huggingface.co/joachimsallstrom/aether-cloud-lora-for-sdxl/resolve/main/2378710.jpeg",
14
+ "title": "Aether Cloud",
15
+ "repo": "joachimsallstrom/aether-cloud-lora-for-sdxl",
16
+ "trigger_word": "a cloud that looks like a",
17
+ "weights": "Aether_Cloud_v1.safetensors",
18
+ "is_compatible": true,
19
+ "likes": 2,
20
+ "downloads": 0
21
+ },
22
+ {
23
+ "image": "https://tjzk.replicate.delivery/models_models_cover_image/c8b21524-342a-4dd2-bb01-3e65349ed982/image_12.jpeg",
24
+ "title": "Zelda 64 SDXL",
25
+ "repo": "jbilcke-hf/sdxl-zelda64",
26
+ "trigger_word": "in the style of <s0><s1>",
27
+ "weights": "lora.safetensors",
28
+ "text_embedding_weights": "embeddings.pti",
29
+ "is_compatible": false,
30
+ "is_pivotal": true,
31
+ "likes": 3,
32
+ "downloads": 0
33
+ },
34
+ {
35
+ "image": "https://pbxt.replicate.delivery/8LKCty2D5b5BBBjylErfI8Xqf4OTSsnA0TIJccnpPct3GmeiA/out-0.png",
36
+ "title": "2004 bad digital photography",
37
+ "repo": "fofr/sdxl-2004",
38
+ "trigger_word": "2004, in the style of <s0><s1>",
39
+ "weights": "lora.safetensors",
40
+ "text_embedding_weights": "embeddings.pti",
41
+ "is_compatible": false,
42
+ "is_pivotal": true,
43
+ "likes": 3,
44
+ "downloads": 0
45
+ },
46
+ {
47
+ "image": "https://huggingface.co/joachimsallstrom/aether-ghost-lora-for-sdxl/resolve/14de4e59a3f44dabc762855da208cb8f44a7ac78/ghost.png",
48
+ "title": "Aether Ghost",
49
+ "repo": "joachimsallstrom/aether-ghost-lora-for-sdxl",
50
+ "trigger_word": "transparent ghost",
51
+ "weights": "Aether_Ghost_v1.1_LoRA.safetensors",
52
+ "is_compatible": true,
53
+ "likes": 5,
54
+ "downloads": 0
55
+ },
56
+ {
57
+ "image": "https://huggingface.co/artificialguybr/ColoringBookRedmond-V2/resolve/main/00493-1759595235.png",
58
+ "title": "ColoringBook.Redmond V2",
59
+ "repo": "artificialguybr/ColoringBookRedmond-V2",
60
+ "trigger_word": "ColoringBookAF",
61
+ "weights": "ColoringBookRedmond-ColoringBook-ColoringBookAF.safetensors",
62
+ "is_compatible": true,
63
+ "likes": 2,
64
+ "downloads": 0
65
+ },
66
+ {
67
+ "image": "https://huggingface.co/Norod78/SDXL-LofiGirl-Lora/resolve/main/SDXL-LofiGirl-Lora/Examples/_00044-20230829080050-45-the%20%20girl%20with%20a%20pearl%20earring%20the%20LofiGirl%20%20_lora_SDXL-LofiGirl-Lora_1_%2C%20Very%20detailed%2C%20clean%2C%20high%20quality%2C%20sharp%20image.jpg",
68
+ "title": "LoFi Girl SDXL",
69
+ "repo": "Norod78/SDXL-LofiGirl-Lora",
70
+ "trigger_word": "LofiGirl",
71
+ "weights": "SDXL-LofiGirl-Lora.safetensors",
72
+ "is_compatible": true,
73
+ "likes": 3,
74
+ "downloads": 0
75
+ },
76
+ {
77
+ "image": "https://huggingface.co/veryVANYA/ps1-graphics-sdxl/resolve/main/2070471.jpeg",
78
+ "title": "PS1 Graphics v2 SDXL",
79
+ "repo": "veryVANYA/ps1-graphics-sdxl-v2",
80
+ "trigger_word": "ps1 style",
81
+ "weights": "ps1_style_SDXL_v2.safetensors",
82
+ "is_compatible": true,
83
+ "likes": 3,
84
+ "downloads": 0
85
+ },
86
+ {
87
+ "image": "https://huggingface.co/davizca87/c-a-g-coinmaker/resolve/main/1722160.jpeg",
88
+ "title": "CAG Coinmaker",
89
+ "repo": "davizca87/c-a-g-coinmaker",
90
+ "trigger_word": "c01n",
91
+ "weights": "c01n-000010.safetensors",
92
+ "is_compatible": true,
93
+ "likes": 1,
94
+ "downloads": 0
95
+ },
96
+ {
97
+ "image": "https://huggingface.co/Norod78/SDXL-StickerSheet-Lora/resolve/main/Examples/00073-20230831113700-7780-Cthulhu%20StickerSheet%20%20_lora_SDXL-StickerSheet-Lora_1_%2C%20based%20on%20H.P%20Lovecraft%20stories%2C%20Very%20detailed%2C%20clean%2C%20high%20quality%2C%20sharp.jpg",
98
+ "title": "Sticker Sheet",
99
+ "repo": "Norod78/SDXL-StickerSheet-Lora",
100
+ "trigger_word": "StickerSheet",
101
+ "weights": "SDXL-StickerSheet-Lora.safetensors",
102
+ "is_compatible": true,
103
+ "likes": 12,
104
+ "downloads": 0
105
+ },
106
+ {
107
+ "image": "https://huggingface.co/goofyai/Leonardo_Ai_Style_Illustration/resolve/main/leo-2.png",
108
+ "title": "Leonardo Style",
109
+ "repo": "goofyai/Leonardo_Ai_Style_Illustration",
110
+ "trigger_word": "leonardo style",
111
+ "weights": "leonardo_illustration.safetensors",
112
+ "is_compatible": true,
113
+ "likes": 4,
114
+ "downloads": 0
115
+ },
116
+ {
117
+ "image": "https://huggingface.co/Norod78/SDXL-simpstyle-Lora/resolve/main/Examples/00006-20230820150225-558-the%20girl%20with%20a%20pearl%20earring%20by%20johannes%20vermeer%20simpstyle%20_lora_SDXL-simpstyle-Lora_1_%2C%20Very%20detailed%2C%20clean%2C%20high%20quality%2C%20sh.jpg",
118
+ "title": "SimpStyle",
119
+ "repo": "Norod78/SDXL-simpstyle-Lora",
120
+ "trigger_word": "simpstyle",
121
+ "weights": "SDXL-simpstyle-Lora-r8.safetensors",
122
+ "is_compatible": true,
123
+ "likes": 6,
124
+ "downloads": 0
125
+ },
126
+ {
127
+ "image": "https://huggingface.co/artificialguybr/StoryBookRedmond/resolve/main/00162-1569823442.png",
128
+ "title": "Storybook.Redmond",
129
+ "repo": "artificialguybr/StoryBookRedmond",
130
+ "trigger_word": "KidsRedmAF",
131
+ "weights": "StoryBookRedmond-KidsRedmAF.safetensors",
132
+ "is_compatible": true,
133
+ "likes": 2,
134
+ "downloads": 0
135
+ },
136
+ {
137
+ "image": "https://huggingface.co/chillpixel/blacklight-makeup-sdxl-lora/resolve/main/preview.png",
138
+ "title": "Blacklight Makeup",
139
+ "repo": "chillpixel/blacklight-makeup-sdxl-lora",
140
+ "trigger_word": "with blacklight makeup",
141
+ "weights": "pytorch_lora_weights.bin",
142
+ "is_compatible": true,
143
+ "likes": 3,
144
+ "downloads": 508
145
+ },
146
+ {
147
+ "repo": "ProomptEngineer/pe-neon-sign-style",
148
+ "title": "pe-neon-sign-style",
149
+ "trigger_word": "PENeonSign",
150
+ "is_compatible": true,
151
+ "image": "https://huggingface.co/ProomptEngineer/pe-neon-sign-style/resolve/main/2266230.jpeg",
152
+ "weights": "PE_NeonSignStyle.safetensors",
153
+ "likes": 0,
154
+ "downloads": 0
155
+ },
156
+ {
157
+ "repo": "ProomptEngineer/pe-lofi-hiphop-lofi-girl-concept",
158
+ "title": "pe-lofi-hiphop-lofi-girl-concept",
159
+ "trigger_word": "PELofiHipHop",
160
+ "is_compatible": true,
161
+ "image": "https://huggingface.co/ProomptEngineer/pe-lofi-hiphop-lofi-girl-concept/resolve/main/1967528.jpeg",
162
+ "weights": "PE_LofiHipHop.safetensors",
163
+ "likes": 0,
164
+ "downloads": 0
165
+ },
166
+ {
167
+ "repo": "ProomptEngineer/pe-shitty-fanart",
168
+ "title": "pe-shitty-fanart",
169
+ "trigger_word": "PETerribleFanArt",
170
+ "is_compatible": true,
171
+ "image": "https://huggingface.co/ProomptEngineer/pe-shitty-fanart/resolve/main/2028517.jpeg",
172
+ "weights": "PE_TerribleFanArtV1.safetensors",
173
+ "likes": 1,
174
+ "downloads": 0
175
+ },
176
+ {
177
+ "repo": "ProomptEngineer/pe-sandsculpter-style",
178
+ "title": "pe-sandsculpter-style",
179
+ "trigger_word": "PESandSculpture",
180
+ "is_compatible": true,
181
+ "image": "https://huggingface.co/ProomptEngineer/pe-sandsculpter-style/resolve/main/2234364.jpeg",
182
+ "weights": "PE_SandSculpture.safetensors",
183
+ "likes": 1,
184
+ "downloads": 0
185
+ },
186
+ {
187
+ "repo": "ProomptEngineer/pe-shitty-medieval-paintings",
188
+ "title": "pe-shitty-medieval-paintings",
189
+ "trigger_word": "PEBadMedivalArt",
190
+ "is_compatible": true,
191
+ "image": "https://huggingface.co/ProomptEngineer/pe-shitty-medieval-paintings/resolve/main/2061695.jpeg",
192
+ "weights": "PE_BadMedivalArt.safetensors",
193
+ "likes": 1,
194
+ "downloads": 0
195
+ },
196
+ {
197
+ "repo": "ProomptEngineer/pe-courtroomsketch-style",
198
+ "title": "pe-courtroomsketch-style",
199
+ "trigger_word": "PECourtRoomSketch",
200
+ "is_compatible": true,
201
+ "image": "https://huggingface.co/ProomptEngineer/pe-courtroomsketch-style/resolve/main/2201914.jpeg",
202
+ "weights": "PE_CourtRoomSketchV2.safetensors",
203
+ "likes": 1,
204
+ "downloads": 0
205
+ },
206
+ {
207
+ "repo": "ProomptEngineer/pe-funko-pop-diffusion-style",
208
+ "title": "pe-funko-pop-diffusion-style",
209
+ "trigger_word": "PEPopFigure",
210
+ "is_compatible": true,
211
+ "image": "https://huggingface.co/ProomptEngineer/pe-funko-pop-diffusion-style/resolve/main/2219678.jpeg",
212
+ "weights": "PE_FunkoPopStyle.safetensors",
213
+ "likes": 0,
214
+ "downloads": 0
215
+ },
216
+ {
217
+ "repo": "lordjia/lelo-lego-lora",
218
+ "title": "lelo-lego-lora",
219
+ "trigger_word": "LEGO BrickHeadz",
220
+ "is_compatible": true,
221
+ "image": "https://huggingface.co/lordjia/lelo-lego-lora/resolve/main/2403933.jpeg",
222
+ "weights": "lego_v2.0_XL_32.safetensors",
223
+ "likes": 4,
224
+ "downloads": 0
225
+ },
226
+ {
227
+ "repo": "KappaNeuro/dressed-animals",
228
+ "title": "dressed-animals",
229
+ "trigger_word": "Dressed animals page",
230
+ "is_compatible": true,
231
+ "image": "https://huggingface.co/KappaNeuro/dressed-animals/resolve/main/2322079.jpeg",
232
+ "weights": "Dressed animals.safetensors",
233
+ "likes": 1,
234
+ "downloads": 0
235
+ },
236
+ {
237
+ "repo": "KappaNeuro/vintage-postage-stamps",
238
+ "title": "vintage-postage-stamps",
239
+ "trigger_word": "Vintage Postage Stamps",
240
+ "is_compatible": true,
241
+ "image": "https://huggingface.co/KappaNeuro/vintage-postage-stamps/resolve/main/2332736.jpeg",
242
+ "weights": "Vintage Postage Stamps.safetensors",
243
+ "likes": 1,
244
+ "downloads": 0
245
+ },
246
+ {
247
+ "repo": "KappaNeuro/video-installation",
248
+ "title": "video-installation",
249
+ "trigger_word": "Video installation",
250
+ "is_compatible": true,
251
+ "image": "https://huggingface.co/KappaNeuro/video-installation/resolve/main/2332706.jpeg",
252
+ "weights": "Video installation.safetensors",
253
+ "likes": 1,
254
+ "downloads": 0
255
+ },
256
+ {
257
+ "repo": "KappaNeuro/ukiyo-e-art",
258
+ "title": "ukiyo-e-art",
259
+ "trigger_word": "Ukiyo-e Art",
260
+ "is_compatible": true,
261
+ "image": "https://huggingface.co/KappaNeuro/ukiyo-e-art/resolve/main/2332646.jpeg",
262
+ "weights": "Ukiyo-e Art.safetensors",
263
+ "likes": 1,
264
+ "downloads": 0
265
+ },
266
+ {
267
+ "repo": "KappaNeuro/surreal-collage",
268
+ "title": "surreal-collage",
269
+ "trigger_word": "Surreal Collage",
270
+ "is_compatible": true,
271
+ "image": "https://huggingface.co/KappaNeuro/surreal-collage/resolve/main/2331965.jpeg",
272
+ "weights": "Surreal Collage.safetensors",
273
+ "likes": 1,
274
+ "downloads": 0
275
+ },
276
+ {
277
+ "repo": "KappaNeuro/stop-motion-animation",
278
+ "title": "stop-motion-animation",
279
+ "trigger_word": "Stop-Motion Animation",
280
+ "is_compatible": true,
281
+ "image": "https://huggingface.co/KappaNeuro/stop-motion-animation/resolve/main/2331934.jpeg",
282
+ "weights": "Stop-Motion Animation.safetensors",
283
+ "likes": 1,
284
+ "downloads": 0
285
+ },
286
+ {
287
+ "repo": "KappaNeuro/studio-ghibli-style",
288
+ "title": "studio-ghibli-style",
289
+ "trigger_word": "Studio Ghibli Style",
290
+ "is_compatible": true,
291
+ "image": "https://huggingface.co/KappaNeuro/studio-ghibli-style/resolve/main/2331948.jpeg",
292
+ "weights": "Studio Ghibli Style.safetensors",
293
+ "likes": 2,
294
+ "downloads": 0
295
+ },
296
+ {
297
+ "repo": "KappaNeuro/punk-collage",
298
+ "title": "punk-collage",
299
+ "trigger_word": "Punk Collage",
300
+ "is_compatible": true,
301
+ "image": "https://huggingface.co/KappaNeuro/punk-collage/resolve/main/2330616.jpeg",
302
+ "weights": "Punk Collage.safetensors",
303
+ "likes": 1,
304
+ "downloads": 0
305
+ },
306
+ {
307
+ "repo": "KappaNeuro/needlepoint",
308
+ "title": "needlepoint",
309
+ "trigger_word": "Needlepoint page",
310
+ "is_compatible": true,
311
+ "image": "https://huggingface.co/KappaNeuro/needlepoint/resolve/main/2329532.jpeg",
312
+ "weights": "Needlepoint.safetensors",
313
+ "likes": 1,
314
+ "downloads": 0
315
+ },
316
+ {
317
+ "repo": "KappaNeuro/made-of-iridescent-foil",
318
+ "title": "made-of-iridescent-foil",
319
+ "trigger_word": "Made Of Iridescent Foil page",
320
+ "is_compatible": true,
321
+ "image": "https://huggingface.co/KappaNeuro/made-of-iridescent-foil/resolve/main/2325476.jpeg",
322
+ "weights": "Made Of Iridescent Foil.safetensors",
323
+ "likes": 1,
324
+ "downloads": 0
325
+ },
326
+ {
327
+ "repo": "KappaNeuro/lascaux",
328
+ "title": "lascaux",
329
+ "trigger_word": "Lascaux page",
330
+ "is_compatible": true,
331
+ "image": "https://huggingface.co/KappaNeuro/lascaux/resolve/main/2325538.jpeg",
332
+ "weights": "Lascaux.safetensors",
333
+ "likes": 1,
334
+ "downloads": 0
335
+ },
336
+ {
337
+ "repo": "KappaNeuro/color-palette",
338
+ "title": "color-palette",
339
+ "trigger_word": "Color Palette -",
340
+ "is_compatible": true,
341
+ "image": "https://huggingface.co/KappaNeuro/color-palette/resolve/main/2248053.jpeg",
342
+ "weights": "Color Palette.safetensors",
343
+ "likes": 2,
344
+ "downloads": 0
345
+ },
346
+ {
347
+ "repo": "KappaNeuro/albumen-print",
348
+ "title": "albumen-print",
349
+ "trigger_word": "Albumen Print page",
350
+ "is_compatible": true,
351
+ "image": "https://huggingface.co/KappaNeuro/albumen-print/resolve/main/2320833.jpeg",
352
+ "weights": "Albumen Print.safetensors",
353
+ "likes": 1,
354
+ "downloads": 0
355
+ },
356
+ {
357
+ "repo": "KappaNeuro/1987-action-figure-playset-packaging",
358
+ "title": "1987-action-figure-playset-packaging",
359
+ "trigger_word": "1987 Action Figure Playset Packaging page",
360
+ "is_compatible": true,
361
+ "image": "https://huggingface.co/KappaNeuro/1987-action-figure-playset-packaging/resolve/main/2320798.jpeg",
362
+ "weights": "1987 Action Figure Playset Packaging.safetensors",
363
+ "likes": 1,
364
+ "downloads": 0
365
+ },
366
+ {
367
+ "repo": "Norod78/SDXL-VintageMagStyle-Lora",
368
+ "title": "SDXL-VintageMagStyle-Lora",
369
+ "trigger_word": "VintageMagStyle",
370
+ "is_compatible": true,
371
+ "image": "https://huggingface.co/Norod78/SDXL-VintageMagStyle-Lora/resolve/main/Examples/00015-20230906102032-7778-Wonderwoman%20VintageMagStyle%20%20%20_lora_SDXL-VintageMagStyle-Lora_1_,%20Very%20detailed,%20clean,%20high%20quality,%20sharp%20image.jpg",
372
+ "weights": "SDXL-VintageMagStyle-Lora.safetensors",
373
+ "likes": 7,
374
+ "downloads": 0
375
+ },
376
+ {
377
+ "repo": "CiroN2022/road-sign",
378
+ "title": "road-sign",
379
+ "trigger_word": "road sign",
380
+ "is_compatible": true,
381
+ "image": "https://huggingface.co/CiroN2022/road-sign/resolve/main/2338481.jpeg",
382
+ "weights": "road_sign.safetensors",
383
+ "likes": 0,
384
+ "downloads": 0
385
+ },
386
+ {
387
+ "repo": "CiroN2022/mosaic-style",
388
+ "title": "mosaic-style",
389
+ "trigger_word": "mosaic",
390
+ "is_compatible": true,
391
+ "image": "https://huggingface.co/CiroN2022/mosaic-style/resolve/main/2216189.jpeg",
392
+ "weights": "mosaic.safetensors",
393
+ "likes": 1,
394
+ "downloads": 0
395
+ },
396
+ {
397
+ "repo": "CiroN2022/cd-md-music",
398
+ "title": "cd-md-music",
399
+ "trigger_word": "product photo cd",
400
+ "is_compatible": true,
401
+ "image": "https://huggingface.co/CiroN2022/cd-md-music/resolve/main/2183289.jpeg",
402
+ "weights": "cd_music.safetensors",
403
+ "likes": 0,
404
+ "downloads": 0
405
+ },
406
+ {
407
+ "repo": "CiroN2022/hair-style",
408
+ "title": "hair-style",
409
+ "trigger_word": "crazy alternate hairstyle",
410
+ "is_compatible": true,
411
+ "image": "https://huggingface.co/CiroN2022/hair-style/resolve/main/2193812.jpeg",
412
+ "weights": "hair_style.safetensors",
413
+ "likes": 0,
414
+ "downloads": 0
415
+ },
416
+ {
417
+ "repo": "CiroN2022/overprint-effect",
418
+ "title": "overprint-effect",
419
+ "trigger_word": "overprint_effect",
420
+ "is_compatible": true,
421
+ "image": "https://huggingface.co/CiroN2022/overprint-effect/resolve/main/2139470.jpeg",
422
+ "weights": "Overprint_effect_sdxl.safetensors",
423
+ "likes": 1,
424
+ "downloads": 0
425
+ },
426
+ {
427
+ "repo": "CiroN2022/toy-face",
428
+ "title": "toy-face",
429
+ "trigger_word": "toy_face",
430
+ "is_compatible": true,
431
+ "image": "https://huggingface.co/CiroN2022/toy-face/resolve/main/2123367.jpeg",
432
+ "weights": "toy_face_sdxl.safetensors",
433
+ "likes": 0,
434
+ "downloads": 0
435
+ },
436
+ {
437
+ "repo": "CiroN2022/ascii-art",
438
+ "title": "ascii-art",
439
+ "trigger_word": "ascii_art",
440
+ "is_compatible": true,
441
+ "image": "https://huggingface.co/CiroN2022/ascii-art/resolve/main/2080723.jpeg",
442
+ "weights": "ascii_art-sdxl.safetensors",
443
+ "likes": 0,
444
+ "downloads": 0
445
+ },
446
+ {
447
+ "repo": "artificialguybr/PixelArtRedmond",
448
+ "title": "PixelArtRedmond",
449
+ "trigger_word": "Pixel Art, PixArFK",
450
+ "likes": 1,
451
+ "downloads": 0,
452
+ "is_compatible": true,
453
+ "image": "https://huggingface.co/artificialguybr/PixelArtRedmond/resolve/main/pixel-0017-714031916.png",
454
+ "weights": "PixelArtRedmond-Lite64.safetensors"
455
+ },
456
+ {
457
+ "repo": "artificialguybr/StickersRedmond",
458
+ "title": "StickersRedmond",
459
+ "trigger_word": "Stickers",
460
+ "likes": 2,
461
+ "downloads": 0,
462
+ "is_compatible": true,
463
+ "image": "https://huggingface.co/artificialguybr/StickersRedmond/resolve/main/00000-3383490575.png",
464
+ "weights": "StickersRedmond.safetensors"
465
+ },
466
+ {
467
+ "repo": "artificialguybr/ClayAnimationRedmond",
468
+ "title": "ClayAnimationRedmond",
469
+ "trigger_word": "Clay Animation",
470
+ "likes": 5,
471
+ "downloads": 0,
472
+ "is_compatible": true,
473
+ "image": "https://huggingface.co/artificialguybr/ClayAnimationRedmond/resolve/main/00138-3585231804.png",
474
+ "weights": "ClayAnimationRedm.safetensors"
475
+ },
476
+ {
477
+ "image":"https://replicate.delivery/pbxt/aVhJriYftYQCFCd81DrvNGktIcOlJrb3fifcOTQ3yI7LZWxiA/out-0.png",
478
+ "repo": "fofr/sdxl-vision-pro",
479
+ "title": "SDXL Vision Pro",
480
+ "trigger_word": "<s0><s1> VR headset",
481
+ "weights": "lora.safetensors",
482
+ "text_embedding_weights": "embeddings.pti",
483
+ "is_compatible": false,
484
+ "is_pivotal": true,
485
+ "likes": 1,
486
+ "downloads": 0
487
+ },
488
+ {
489
+ "image": "https://huggingface.co/joachimsallstrom/aether-glitch-lora-for-sdxl/resolve/main/2680627.jpeg",
490
+ "repo": "joachimsallstrom/aether-glitch-lora-for-sdxl",
491
+ "title": "Aether VHS Glitch",
492
+ "trigger_word": "vhs glitch",
493
+ "weights": "Aether_Glitch_v1_LoRA.safetensors",
494
+ "is_compatible": true,
495
+ "likes": 1
496
+ },
497
+ {
498
+ "image": "https://huggingface.co/artificialguybr/TshirtDesignRedmond/resolve/main/00097-1339429505.png",
499
+ "repo": "artificialguybr/TshirtDesignRedmond-V2",
500
+ "title": "T-Shirt.Design.Redmond V2",
501
+ "trigger_word": "TshirtDesignAF",
502
+ "weights": "TShirtDesignRedmondV2-Tshirtdesign-TshirtDesignAF.safetensors",
503
+ "is_compatible": true,
504
+ "likes": 4
505
+ },
506
+ {
507
+ "image": "https://huggingface.co/ostris/ikea-instructions-lora-sdxl/resolve/main/2709929.jpeg",
508
+ "repo": "ostris/ikea-instructions-lora-sdxl",
509
+ "title": "IKEA Instructions",
510
+ "trigger_word": "",
511
+ "weights": "ikea_instructions_xl_v1_5.safetensors",
512
+ "is_compatible": true,
513
+ "likes": 106
514
+ },
515
+ {
516
+ "image": "https://huggingface.co/ostris/super-cereal-sdxl-lora/resolve/main/2879386.jpeg",
517
+ "repo": "ostris/super-cereal-sdxl-lora",
518
+ "title": "Super Cereal",
519
+ "trigger_word": "",
520
+ "weights": "cereal_box_sdxl_v1.safetensors",
521
+ "is_compatible": true,
522
+ "likes": 5
523
+ },
524
+ {
525
+ "image": "https://replicate.delivery/pbxt/CoMBej9GOtyNKqyDHb0fsNSdABpTzOszpjltZGvHsbqif8XjA/out-0.png",
526
+ "repo": "jakedahn/sdxl-isometric-geology",
527
+ "title": "Isometric Geology",
528
+ "trigger_word": "in the style of <s0><s1>",
529
+ "weights": "lora.safetensors",
530
+ "text_embedding_weights": "embeddings.pti",
531
+ "is_compatible": false,
532
+ "is_pivotal": true,
533
+ "likes": 1
534
+ },
535
+ {
536
+ "image": "https://huggingface.co/artificialguybr/analogredmond-v2/resolve/main/00279-913323466.png",
537
+ "repo": "artificialguybr/analogredmond-v2",
538
+ "title":"Analog Photography.Redmond",
539
+ "trigger_word": "AnalogRedmAF",
540
+ "weights": "AnalogRedmondV2-Analog-AnalogRedmAF.safetensors",
541
+ "is_compatible": true,
542
+ "likes": 3
543
+ },
544
+ {
545
+ "image": "https://huggingface.co/stets/nintendo64_cartridge/resolve/main/00002-%5Bnumber%5D-840302403-_%20_lora_n64-000002_1_%20n64%20game%2C%20cartridge%2C%20titled%2C%20chicken%20riding%20a%20bicycle.png",
546
+ "repo":"stets/nintendo64_cartridge",
547
+ "title": "Nintendo 64 Cartridge",
548
+ "weights": "n64-000001.safetensors",
549
+ "trigger_word": "n64",
550
+ "is_compatible": true,
551
+ "likes": 6
552
+ },
553
+ {
554
+ "image": "https://huggingface.co/joachimsallstrom/aether-bubbles-foam-lora-for-sdxl/resolve/main/3056728.jpeg",
555
+ "repo": "joachimsallstrom/aether-bubbles-foam-lora-for-sdxl",
556
+ "title": "Aether Bubbles & Foam",
557
+ "weights": "Aether_Bubbles_And_Foam_v1_SDXL_LoRA.safetensors",
558
+ "trigger_word": "made of bath foam and soap bubbles",
559
+ "is_compatible": true,
560
+ "likes": 2,
561
+ "new": true
562
+ },
563
+ {
564
+ "image": "https://huggingface.co/artificialguybr/3DRedmond-V1/resolve/main/images/00064-2498532539.png",
565
+ "repo":"artificialguybr/3DRedmond-V1",
566
+ "title": "3D.Redmond",
567
+ "weights": "3DRedmond-3DRenderStyle-3DRenderAF.safetensors",
568
+ "trigger_word": "3D Render Style, 3DRenderAF",
569
+ "is_compatible": true,
570
+ "likes": 5,
571
+ "new": true
572
+ },
573
+ {
574
+ "image": "https://i.imgur.com/cAx2FL1.jpg",
575
+ "repo": "CiroN2022/tape-people",
576
+ "title": "Covered in Tape",
577
+ "weights": "Tape_people.safetensors",
578
+ "trigger_word": "covered of tape, caution tape, keep out",
579
+ "is_compatible": true,
580
+ "likes": 2,
581
+ "new": true
582
+ }
583
+ ]
src/routes/api/models/+server.ts CHANGED
@@ -1,19 +1,42 @@
1
  import { error, json, type RequestEvent } from '@sveltejs/kit';
2
  // import { env } from '$env/dynamic/private'
3
 
4
- import jsonData from "$lib/cards.json";
 
5
 
6
  /** @type {import('./$types').RequestHandler} */
7
 
 
 
 
 
 
 
 
 
8
  export async function GET(request : RequestEvent) {
9
  const hasError = false
10
 
11
  const page = parseInt(request.url.searchParams.get('page') || '0')
 
 
 
 
 
12
  if (hasError) {
13
  return error(500, 'Internal Server Error')
14
  }
15
 
16
- const cards = jsonData.slice(page * 25, page * 25 + 25)
 
 
 
 
 
 
 
 
 
17
 
18
  return json({
19
  cards,
 
1
  import { error, json, type RequestEvent } from '@sveltejs/kit';
2
  // import { env } from '$env/dynamic/private'
3
 
4
+ import jsonData from "$lib/utils/loras.json";
5
+ import type { ModelCard } from '$lib/type';
6
 
7
  /** @type {import('./$types').RequestHandler} */
8
 
9
+ const Dict: Record<
10
+ string,
11
+ (a: ModelCard, b: ModelCard) => number
12
+ > = {
13
+ hotest: (a: ModelCard, b: ModelCard) => (b.downloads ?? 0) - (a.downloads ?? 0),
14
+ likes: (a: ModelCard, b: ModelCard) => b.likes - a.likes,
15
+ }
16
+
17
  export async function GET(request : RequestEvent) {
18
  const hasError = false
19
 
20
  const page = parseInt(request.url.searchParams.get('page') || '0')
21
+ const filter = request.url.searchParams.get('filter') || 'hotest'
22
+ const search = request.url.searchParams.get('search') || ''
23
+
24
+ console.log({ search })
25
+
26
  if (hasError) {
27
  return error(500, 'Internal Server Error')
28
  }
29
 
30
+ let cards: ModelCard[] = jsonData
31
+
32
+ if (search) {
33
+ cards = cards.filter((card) => card.title.toLowerCase().includes(search.toLowerCase()))
34
+ }
35
+
36
+ const sortFunc = Dict[filter] || Dict['hotest']
37
+ cards = cards.sort(sortFunc)
38
+
39
+ cards = cards.slice(page * 25, page * 25 + 25)
40
 
41
  return json({
42
  cards,
src/routes/models/+page.svelte CHANGED
@@ -12,17 +12,31 @@
12
  export let data;
13
 
14
  let form = {
15
- filter: "hot",
 
16
  page: "0",
17
  }
18
 
19
  $: elementScroll = browser ? document?.getElementById('app') : undefined;
20
 
21
- const fetchMore = async () => {
22
  form = {...form, page: (Number(form.page) + 1).toString()};
23
- const request = await fetch(`/api/community?${new URLSearchParams(form)}`);
 
 
 
 
 
 
 
 
 
 
 
 
24
  const response = await request.json();
25
- data = {...data, cards: [...data.cards, ...response.cards ]};
 
26
  }
27
  </script>
28
 
@@ -32,10 +46,10 @@
32
  </svelte:head>
33
 
34
  <h1 class="text-white font-semibold text-2xl">
35
- Explore Models
36
  </h1>
37
- <div class="flex items-center justify-between mt-5">
38
- <Radio options={MODELS_FILTER_OPTIONS} value="{form.filter}" onChange={(filter) => form = {...form, filter }} />
39
  <div class="items-center justify-end gap-5 hidden lg:flex">
40
  <Button icon="ic:round-plus" theme="dark" size="lg">Create</Button>
41
  <Button icon="octicon:upload-16" theme="blue" size="lg">Upload model</Button>
@@ -46,7 +60,7 @@
46
  </div>
47
  </div>
48
  <div class="mt-5 max-w-sm">
49
- <Input placeholder="Search a model" />
50
  </div>
51
  <div class="mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-5 gap-5 mt-8 lg:mt-10">
52
  {#each data.cards as card}
@@ -56,7 +70,7 @@
56
  elementScroll="{elementScroll ?? undefined}"
57
  threshold={100}
58
  hasMore={data.total_items > data.cards.length}
59
- on:loadMore={fetchMore}
60
  />
61
  <GoTop />
62
  </div>
 
12
  export let data;
13
 
14
  let form = {
15
+ filter: "hotest",
16
+ search: "",
17
  page: "0",
18
  }
19
 
20
  $: elementScroll = browser ? document?.getElementById('app') : undefined;
21
 
22
+ const handleFetchMore = async () => {
23
  form = {...form, page: (Number(form.page) + 1).toString()};
24
+ refetch(true);
25
+ }
26
+ const handleChangeFilter = async (filter: string) => {
27
+ form = { ...form, filter, page: (0).toString()};
28
+ refetch(false)
29
+ }
30
+ const handleChangeSearch = async (search: string) => {
31
+ form = { ...form, search, page: (0).toString()};
32
+ refetch(false)
33
+ }
34
+
35
+ const refetch = async (add: boolean) => {
36
+ const request = await fetch(`/api/models?${new URLSearchParams(form)}`);
37
  const response = await request.json();
38
+ if (add) data = {...data, cards: [...data.cards, ...response.cards ]};
39
+ else data = response;
40
  }
41
  </script>
42
 
 
46
  </svelte:head>
47
 
48
  <h1 class="text-white font-semibold text-2xl">
49
+ Explore Models : {form.search}
50
  </h1>
51
+ <div class="flex items-start sm:items-center justify-between mt-5 flex-col sm:flex-row gap-5 sm:justify-between">
52
+ <Radio options={MODELS_FILTER_OPTIONS} value="{form.filter}" onChange={handleChangeFilter} />
53
  <div class="items-center justify-end gap-5 hidden lg:flex">
54
  <Button icon="ic:round-plus" theme="dark" size="lg">Create</Button>
55
  <Button icon="octicon:upload-16" theme="blue" size="lg">Upload model</Button>
 
60
  </div>
61
  </div>
62
  <div class="mt-5 max-w-sm">
63
+ <Input value={form.search} placeholder="Search a model" onChange={handleChangeSearch} />
64
  </div>
65
  <div class="mx-auto grid grid-cols-1 sm:grid-cols-2 md:grid-cols-3 2xl:grid-cols-5 gap-5 mt-8 lg:mt-10">
66
  {#each data.cards as card}
 
70
  elementScroll="{elementScroll ?? undefined}"
71
  threshold={100}
72
  hasMore={data.total_items > data.cards.length}
73
+ on:loadMore={handleFetchMore}
74
  />
75
  <GoTop />
76
  </div>
src/routes/models/+page.ts CHANGED
@@ -1,5 +1,5 @@
1
  export async function load({ fetch }) {
2
- const response = await fetch("/api/models?page=1", {
3
  method: "GET",
4
  headers: {
5
  "Content-Type": "application/json"
 
1
  export async function load({ fetch }) {
2
+ const response = await fetch("/api/models?page=0&filter=hotest", {
3
  method: "GET",
4
  headers: {
5
  "Content-Type": "application/json"