Spaces:
Runtime error
Runtime error
wip
Browse files
src/lib/components/InferencePlayground/InferencePlayground.svelte
CHANGED
|
@@ -5,9 +5,9 @@
|
|
| 5 |
handleNonStreamingResponse,
|
| 6 |
isSystemPromptSupported
|
| 7 |
} from './inferencePlaygroundUtils';
|
| 8 |
-
import
|
| 9 |
-
import
|
| 10 |
-
import
|
| 11 |
import ModelPickerModal from './InferencePlaygroundModelPickerModal.svelte';
|
| 12 |
import Conversation from './InferencePlaygroundConversation.svelte';
|
| 13 |
import { onDestroy } from 'svelte';
|
|
@@ -152,7 +152,7 @@
|
|
| 152 |
</script>
|
| 153 |
|
| 154 |
{#if showTokenModal}
|
| 155 |
-
<
|
| 156 |
on:close={() => (showTokenModal = false)}
|
| 157 |
on:submit={(e) => {
|
| 158 |
const formData = new FormData(e.target);
|
|
@@ -277,13 +277,13 @@
|
|
| 277 |
<div
|
| 278 |
class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
|
| 279 |
>
|
| 280 |
-
<
|
| 281 |
{models}
|
| 282 |
bind:conversation
|
| 283 |
on:click={() => (showModelPickerModal = open)}
|
| 284 |
/>
|
| 285 |
|
| 286 |
-
<
|
| 287 |
<div class="mt-auto">
|
| 288 |
<div class="mb-3 flex items-center justify-between gap-2">
|
| 289 |
<label for="default-range" class="block text-sm font-medium text-gray-900 dark:text-white"
|
|
|
|
| 5 |
handleNonStreamingResponse,
|
| 6 |
isSystemPromptSupported
|
| 7 |
} from './inferencePlaygroundUtils';
|
| 8 |
+
import GenerationConfig from './InferencePlaygroundGenerationConfig.svelte';
|
| 9 |
+
import HFTokenModal from './InferencePlaygroundHFTokenModal.svelte';
|
| 10 |
+
import ModelSelector from './InferencePlaygroundModelSelector.svelte';
|
| 11 |
import ModelPickerModal from './InferencePlaygroundModelPickerModal.svelte';
|
| 12 |
import Conversation from './InferencePlaygroundConversation.svelte';
|
| 13 |
import { onDestroy } from 'svelte';
|
|
|
|
| 152 |
</script>
|
| 153 |
|
| 154 |
{#if showTokenModal}
|
| 155 |
+
<HFTokenModal
|
| 156 |
on:close={() => (showTokenModal = false)}
|
| 157 |
on:submit={(e) => {
|
| 158 |
const formData = new FormData(e.target);
|
|
|
|
| 277 |
<div
|
| 278 |
class="flex flex-1 flex-col gap-6 overflow-y-hidden rounded-xl border border-gray-200/80 bg-gradient-to-b from-white via-white p-3 shadow-sm dark:border-white/5 dark:from-gray-800/40 dark:via-gray-800/40"
|
| 279 |
>
|
| 280 |
+
<ModelSelector
|
| 281 |
{models}
|
| 282 |
bind:conversation
|
| 283 |
on:click={() => (showModelPickerModal = open)}
|
| 284 |
/>
|
| 285 |
|
| 286 |
+
<GenerationConfig bind:conversation />
|
| 287 |
<div class="mt-auto">
|
| 288 |
<div class="mb-3 flex items-center justify-between gap-2">
|
| 289 |
<label for="default-range" class="block text-sm font-medium text-gray-900 dark:text-white"
|
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte
CHANGED
|
@@ -4,7 +4,6 @@
|
|
| 4 |
|
| 5 |
export let models: ModelEntryWithTokenizer[] = [];
|
| 6 |
export let conversation: Conversation;
|
| 7 |
-
export let disabled = false;
|
| 8 |
|
| 9 |
async function getAvatarUrl(orgName: string) {
|
| 10 |
const url = `https://huggingface.co/api/organizations/${orgName}/avatar`;
|
|
|
|
| 4 |
|
| 5 |
export let models: ModelEntryWithTokenizer[] = [];
|
| 6 |
export let conversation: Conversation;
|
|
|
|
| 7 |
|
| 8 |
async function getAvatarUrl(orgName: string) {
|
| 9 |
const url = `https://huggingface.co/api/organizations/${orgName}/avatar`;
|