enzostvs HF staff commited on
Commit
74e73b3
β€’
1 Parent(s): 2401f68

fix URL generation in drawer

Browse files
src/app.html CHANGED
@@ -22,7 +22,7 @@
22
  content="LoRA Studio is a platform for creating, sharing, and using models"
23
  />
24
  <meta property="og:image" content="%sveltekit.assets%/metadata.png" />
25
- <meta property="og:url" content="https://lora-studio.vercel.app" />
26
  <meta property="og:type" content="website" />
27
  <meta name="twitter:card" content="summary_large_image" />
28
  <meta name="twitter:site" content="@huggingface" />
 
22
  content="LoRA Studio is a platform for creating, sharing, and using models"
23
  />
24
  <meta property="og:image" content="%sveltekit.assets%/metadata.png" />
25
+ <meta property="og:url" content="https://enzostvs-lora-studio.hf.space/" />
26
  <meta property="og:type" content="website" />
27
  <meta name="twitter:card" content="summary_large_image" />
28
  <meta name="twitter:site" content="@huggingface" />
src/lib/components/generate/Response.svelte CHANGED
@@ -114,7 +114,7 @@
114
  <div class="flex items-center justify-start gap-4 px-2 py-2.5 rounded-lg cursor-pointer w-full text-left">
115
  <img src={generation?.form?.model.image} alt={generation?.form?.model.title} class="w-14 h-14 rounded-lg object-cover" />
116
  <div>
117
- <p class="text-neutral-200 text-base font-medium">{generation?.form?.model.title}</p>
118
  <p class="text-neutral-400 text-sm">{generation?.form?.model.id}</p>
119
  </div>
120
  </div>
 
114
  <div class="flex items-center justify-start gap-4 px-2 py-2.5 rounded-lg cursor-pointer w-full text-left">
115
  <img src={generation?.form?.model.image} alt={generation?.form?.model.title} class="w-14 h-14 rounded-lg object-cover" />
116
  <div>
117
+ <p class="text-neutral-200 text-base font-medium">{generation?.form?.model.id}</p>
118
  <p class="text-neutral-400 text-sm">{generation?.form?.model.id}</p>
119
  </div>
120
  </div>
src/lib/components/models/drawer/Drawer.svelte CHANGED
@@ -98,7 +98,7 @@
98
  <div id="gallery_examples" class="w-full h-[300px] mt-2 flex flex-nowrap overflow-auto gap-5 relative">
99
  {#each model?.gallery as example}
100
  <div class="w-[300px] min-w-[300px] h-full relative">
101
- <img src="{env.PUBLIC_FILE_UPLOAD_DIR}/{example.image}" class="w-full h-full bg-center bg-cover rounded-lg object-cover object-center bg-neutral-800" alt={example.prompt} />
102
  </div>
103
  {/each}
104
  </div>
 
98
  <div id="gallery_examples" class="w-full h-[300px] mt-2 flex flex-nowrap overflow-auto gap-5 relative">
99
  {#each model?.gallery as example}
100
  <div class="w-[300px] min-w-[300px] h-full relative">
101
+ <img src="/api/images/{example.image}" class="w-full h-full bg-center bg-cover rounded-lg object-cover object-center bg-neutral-800" alt={example.prompt} />
102
  </div>
103
  {/each}
104
  </div>
src/routes/api/models/[id]/+server.ts CHANGED
@@ -153,7 +153,7 @@ export async function DELETE({ params, cookies } : RequestEvent) {
153
  }
154
 
155
  const user = await tokenIsAvailable(token)
156
- if (!user || !process.env.SECRET_HF_ADMIN.includes(user.sub)) {
157
  return json({
158
  error: {
159
  token: "Wrong castle fam :^)"
 
153
  }
154
 
155
  const user = await tokenIsAvailable(token)
156
+ if (!user || !process.env.SECRET_HF_ADMIN?.includes(user.sub)) {
157
  return json({
158
  error: {
159
  token: "Wrong castle fam :^)"