mishig HF staff commited on
Commit
eeca96c
1 Parent(s): c4b38e4
src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte CHANGED
@@ -293,17 +293,17 @@ print(output.choices[0].message)`,
293
  </div>
294
 
295
  {#each snippetsByLanguage[selectedLanguage] as { label, code, language, needsToken }}
296
- <div class="flex items-center justify-between px-2 pb-4 pt-6 ">
297
  <h2 class="font-semibold">{label}</h2>
298
  <div class="flex items-center gap-x-4">
299
  {#if needsToken && hfToken}
300
- <label class="flex items-center gap-x-1.5 text-sm select-none">
301
  <input type="checkbox" bind:checked={showToken} />
302
  <p class="leading-none">With token</p>
303
  </label>
304
  {/if}
305
  <button
306
- class="flex items-center gap-x-2 rounded-md bg-white border dark:border-gray-800 shadow-sm px-1.5 py-0.5 text-sm transition dark:bg-gray-800"
307
  on:click={e => {
308
  const el = e.currentTarget;
309
  el.classList.add("text-green-500");
@@ -316,7 +316,7 @@ print(output.choices[0].message)`,
316
  }, 400);
317
  }}
318
  >
319
- <IconCopyCode classNames="text-xs"/> Copy code
320
  </button>
321
  </div>
322
  </div>
 
293
  </div>
294
 
295
  {#each snippetsByLanguage[selectedLanguage] as { label, code, language, needsToken }}
296
+ <div class="flex items-center justify-between px-2 pb-4 pt-6">
297
  <h2 class="font-semibold">{label}</h2>
298
  <div class="flex items-center gap-x-4">
299
  {#if needsToken && hfToken}
300
+ <label class="flex select-none items-center gap-x-1.5 text-sm">
301
  <input type="checkbox" bind:checked={showToken} />
302
  <p class="leading-none">With token</p>
303
  </label>
304
  {/if}
305
  <button
306
+ class="flex items-center gap-x-2 rounded-md border bg-white px-1.5 py-0.5 text-sm shadow-sm transition dark:border-gray-800 dark:bg-gray-800"
307
  on:click={e => {
308
  const el = e.currentTarget;
309
  el.classList.add("text-green-500");
 
316
  }, 400);
317
  }}
318
  >
319
+ <IconCopyCode classNames="text-xs" /> Copy code
320
  </button>
321
  </div>
322
  </div>
src/lib/components/InferencePlayground/InferencePlaygroundConversation.svelte CHANGED
@@ -49,7 +49,7 @@
49
  {/each}
50
 
51
  <button
52
- class="flex px-3.5 md:px-6 py-6 hover:bg-gray-50 dark:hover:bg-gray-800/50"
53
  on:click={() => dispatch("addMessage")}
54
  disabled={loading}
55
  >
 
49
  {/each}
50
 
51
  <button
52
+ class="flex px-3.5 py-6 hover:bg-gray-50 md:px-6 dark:hover:bg-gray-800/50"
53
  on:click={() => dispatch("addMessage")}
54
  disabled={loading}
55
  >
src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte CHANGED
@@ -78,13 +78,13 @@
78
  </div>
79
  <!-- Modal body -->
80
  <div class="p-4 md:p-5">
81
- <p class="text-base leading-relaxed text-gray-800 dark:text-gray-300 mb-5 2xl:text-balance">
82
  You need a free Hugging Face token to use this application. <strong class="font-semibold"
83
  >Make sure you create a token with Inference API permission.</strong
84
  ><br /> Your token is kept safe by only being used from your browser.
85
  </p>
86
  <div>
87
- <label for="hf-token" class="mb-3 block text-smd font-medium text-gray-900 dark:text-white "
88
  >Hugging Face Token</label
89
  >
90
  <input
@@ -96,11 +96,10 @@
96
  class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
97
  />
98
  </div>
99
- <label class="flex items-center gap-x-1.5 text-gray-900 dark:text-gray-200 mt-4">
100
  <input type="checkbox" bind:checked={storeLocallyHfToken} />
101
- <p class="leading-none text-sm">
102
- Save to local storage for future use
103
- </label>
104
  </div>
105
 
106
  <!-- Modal footer -->
 
78
  </div>
79
  <!-- Modal body -->
80
  <div class="p-4 md:p-5">
81
+ <p class="mb-5 text-base leading-relaxed text-gray-800 2xl:text-balance dark:text-gray-300">
82
  You need a free Hugging Face token to use this application. <strong class="font-semibold"
83
  >Make sure you create a token with Inference API permission.</strong
84
  ><br /> Your token is kept safe by only being used from your browser.
85
  </p>
86
  <div>
87
+ <label for="hf-token" class="text-smd mb-3 block font-medium text-gray-900 dark:text-white"
88
  >Hugging Face Token</label
89
  >
90
  <input
 
96
  class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
97
  />
98
  </div>
99
+ <label class="mt-4 flex items-center gap-x-1.5 text-gray-900 dark:text-gray-200">
100
  <input type="checkbox" bind:checked={storeLocallyHfToken} />
101
+ <p class="text-sm leading-none">Save to local storage for future use</p></label
102
+ >
 
103
  </div>
104
 
105
  <!-- Modal footer -->
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte CHANGED
@@ -54,7 +54,7 @@
54
  </label>
55
 
56
  <button
57
- class="flex items-center justify-between relative gap-6 overflow-hidden whitespace-nowrap hover:brightness-95 dark:hover:brightness-110 rounded-lg border bg-gray-100/80 px-3 py-1.5 leading-tight shadow dark:border-gray-700 dark:bg-gray-800"
58
  on:click={() => (showModelPickerModal = true)}
59
  >
60
  <div class="flex flex-col items-start">
 
54
  </label>
55
 
56
  <button
57
+ class="relative flex items-center justify-between gap-6 overflow-hidden whitespace-nowrap rounded-lg border bg-gray-100/80 px-3 py-1.5 leading-tight shadow hover:brightness-95 dark:border-gray-700 dark:bg-gray-800 dark:hover:brightness-110"
58
  on:click={() => (showModelPickerModal = true)}
59
  >
60
  <div class="flex flex-col items-start">
tailwind.config.ts CHANGED
@@ -3,7 +3,7 @@ import containerQueries from "@tailwindcss/container-queries";
3
 
4
  export default {
5
  content: ["./src/**/*.{html,js,svelte,ts}"],
6
- darkMode: 'selector',
7
  theme: {
8
  extend: {},
9
  },
 
3
 
4
  export default {
5
  content: ["./src/**/*.{html,js,svelte,ts}"],
6
+ darkMode: "selector",
7
  theme: {
8
  extend: {},
9
  },