misc
Browse files- src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte +5 -5
- src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte +2 -2
- src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte +5 -5
- src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts +5 -3
src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte
CHANGED
@@ -59,7 +59,7 @@
|
|
59 |
on:keydown={handleKeydown}
|
60 |
>
|
61 |
<form on:submit|preventDefault class="relative rounded-lg bg-white shadow dark:bg-gray-900">
|
62 |
-
<div class="flex items-center justify-between rounded-t border-b p-4 md:px-5 md:py-4 dark:border-gray-
|
63 |
<h3 class="flex items-center gap-2.5 text-lg font-semibold text-gray-900 dark:text-white">
|
64 |
<img
|
65 |
alt="Hugging Face's logo"
|
@@ -78,9 +78,9 @@
|
|
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">
|
82 |
You need a free Hugging Face token to use this application. <strong class="font-semibold"
|
83 |
-
>Make sure you create a token with
|
84 |
><br /> Your token is kept safe by only being used from your browser.
|
85 |
</p>
|
86 |
<div>
|
@@ -104,9 +104,9 @@
|
|
104 |
</div>
|
105 |
|
106 |
<!-- Modal footer -->
|
107 |
-
<div class="flex items-center justify-between rounded-b border-t border-gray-200 p-4 md:p-5 dark:border-gray-
|
108 |
<a
|
109 |
-
href="https://huggingface.co/settings/tokens/new?globalPermissions=inference.serverless.write&
|
110 |
tabindex="-1"
|
111 |
target="_blank"
|
112 |
class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
|
|
|
59 |
on:keydown={handleKeydown}
|
60 |
>
|
61 |
<form on:submit|preventDefault class="relative rounded-lg bg-white shadow dark:bg-gray-900">
|
62 |
+
<div class="flex items-center justify-between rounded-t border-b p-4 md:px-5 md:py-4 dark:border-gray-800">
|
63 |
<h3 class="flex items-center gap-2.5 text-lg font-semibold text-gray-900 dark:text-white">
|
64 |
<img
|
65 |
alt="Hugging Face's logo"
|
|
|
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>
|
|
|
104 |
</div>
|
105 |
|
106 |
<!-- Modal footer -->
|
107 |
+
<div class="flex items-center justify-between rounded-b border-t border-gray-200 p-4 md:p-5 dark:border-gray-800">
|
108 |
<a
|
109 |
+
href="https://huggingface.co/settings/tokens/new?globalPermissions=inference.serverless.write&tokenType=fineGrained"
|
110 |
tabindex="-1"
|
111 |
target="_blank"
|
112 |
class="rounded-lg border border-gray-200 bg-white px-5 py-2.5 text-sm font-medium text-gray-900 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:outline-none focus:ring-4 focus:ring-gray-100 dark:border-gray-600 dark:bg-gray-800 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white dark:focus:ring-gray-700"
|
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte
CHANGED
@@ -54,7 +54,7 @@
|
|
54 |
</label>
|
55 |
|
56 |
<button
|
57 |
-
class="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 dark:border-gray-700 dark:bg-gray-800"
|
58 |
on:click={() => (showModelPickerModal = true)}
|
59 |
>
|
60 |
<div class="flex flex-col items-start">
|
@@ -66,6 +66,6 @@
|
|
66 |
</div>
|
67 |
<div>{modelName}</div>
|
68 |
</div>
|
69 |
-
<IconCaret classNames="text-xl bg-gray-100 dark:bg-gray-600 rounded" />
|
70 |
</button>
|
71 |
</div>
|
|
|
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">
|
|
|
66 |
</div>
|
67 |
<div>{modelName}</div>
|
68 |
</div>
|
69 |
+
<IconCaret classNames="text-xl bg-gray-100 dark:bg-gray-600 rounded size-4 flex-none absolute right-2" />
|
70 |
</button>
|
71 |
</div>
|
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte
CHANGED
@@ -97,6 +97,7 @@
|
|
97 |
|
98 |
<svelte:window on:keydown={handleKeydown} on:mousemove={() => (ignoreCursorHighlight = false)} />
|
99 |
|
|
|
100 |
<div
|
101 |
class="fixed inset-0 z-10 flex h-screen items-start justify-center bg-black/85 pt-32"
|
102 |
bind:this={backdropEl}
|
@@ -117,7 +118,7 @@
|
|
117 |
/>
|
118 |
</div>
|
119 |
<div class="max-h-[300px] overflow-y-auto overflow-x-hidden">
|
120 |
-
<div
|
121 |
<div class="px-2 py-1.5 text-xs font-medium text-gray-500">Trending</div>
|
122 |
<div>
|
123 |
{#each featuredModels as model, idx}
|
@@ -135,15 +136,14 @@
|
|
135 |
<IconStar classNames="lucide lucide-star mr-2 h-4 w-4 text-yellow-400" />
|
136 |
<span class="inline-flex items-center"
|
137 |
><span class="text-gray-500 dark:text-gray-400">{nameSpace}</span><span
|
138 |
-
class="mx-1 text-
|
139 |
><span class="text-black dark:text-white">{modelName}</span></span
|
140 |
>
|
141 |
</button>
|
142 |
{/each}
|
143 |
</div>
|
144 |
</div>
|
145 |
-
<div
|
146 |
-
<div class="p-1">
|
147 |
<div class="px-2 py-1.5 text-xs font-medium text-gray-500">Other Models</div>
|
148 |
<div>
|
149 |
{#each otherModels as model, _idx}
|
@@ -161,7 +161,7 @@
|
|
161 |
>
|
162 |
<span class="inline-flex items-center"
|
163 |
><span class="text-gray-500 dark:text-gray-400">{nameSpace}</span><span
|
164 |
-
class="mx-1 text-
|
165 |
><span class="text-black dark:text-white">{modelName}</span></span
|
166 |
>
|
167 |
</button>
|
|
|
97 |
|
98 |
<svelte:window on:keydown={handleKeydown} on:mousemove={() => (ignoreCursorHighlight = false)} />
|
99 |
|
100 |
+
<!-- svelte-ignore a11y-no-static-element-interactions a11y-click-events-have-key-events -->
|
101 |
<div
|
102 |
class="fixed inset-0 z-10 flex h-screen items-start justify-center bg-black/85 pt-32"
|
103 |
bind:this={backdropEl}
|
|
|
118 |
/>
|
119 |
</div>
|
120 |
<div class="max-h-[300px] overflow-y-auto overflow-x-hidden">
|
121 |
+
<div>
|
122 |
<div class="px-2 py-1.5 text-xs font-medium text-gray-500">Trending</div>
|
123 |
<div>
|
124 |
{#each featuredModels as model, idx}
|
|
|
136 |
<IconStar classNames="lucide lucide-star mr-2 h-4 w-4 text-yellow-400" />
|
137 |
<span class="inline-flex items-center"
|
138 |
><span class="text-gray-500 dark:text-gray-400">{nameSpace}</span><span
|
139 |
+
class="mx-1 text-gray-300 dark:text-gray-700">/</span
|
140 |
><span class="text-black dark:text-white">{modelName}</span></span
|
141 |
>
|
142 |
</button>
|
143 |
{/each}
|
144 |
</div>
|
145 |
</div>
|
146 |
+
<div>
|
|
|
147 |
<div class="px-2 py-1.5 text-xs font-medium text-gray-500">Other Models</div>
|
148 |
<div>
|
149 |
{#each otherModels as model, _idx}
|
|
|
161 |
>
|
162 |
<span class="inline-flex items-center"
|
163 |
><span class="text-gray-500 dark:text-gray-400">{nameSpace}</span><span
|
164 |
+
class="mx-1 text-gray-300 dark:text-gray-700">/</span
|
165 |
><span class="text-black dark:text-white">{modelName}</span></span
|
166 |
>
|
167 |
</button>
|
src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts
CHANGED
@@ -68,7 +68,9 @@ export function isSystemPromptSupported(model: ModelEntryWithTokenizer) {
|
|
68 |
}
|
69 |
|
70 |
export const FEATUED_MODELS_IDS = [
|
71 |
-
"meta-llama/Meta-Llama-3-70B-Instruct",
|
72 |
-
"
|
73 |
-
"
|
|
|
|
|
74 |
];
|
|
|
68 |
}
|
69 |
|
70 |
export const FEATUED_MODELS_IDS = [
|
71 |
+
"meta-llama/Meta-Llama-3.1-70B-Instruct",
|
72 |
+
"meta-llama/Meta-Llama-3.1-8B-Instruct",
|
73 |
+
"google/gemma-2-9b-it",
|
74 |
+
"mistralai/Mistral-7B-Instruct-v0.3",
|
75 |
+
"mistralai/Mistral-Nemo-Instruct-2407",
|
76 |
];
|