Spaces:
Runtime error
Runtime error
wip
Browse filesFiles changed (3)
10 unmodified lines1112131415161710 unmodified linesconst dispatch = createEventDispatcher<{ close: void }>();function handleKeydown(event: KeyboardEvent) {const { key } = event;if (key === "Escape") {event.preventDefault();dispatch("close");10 unmodified lines1112131415161710 unmodified linesconst dispatch = createEventDispatcher<{ close: void }>();function handleKeydown(event: KeyboardEvent) {const { key } = event;if (key === "Escape") {event.preventDefault();dispatch("close");
12 unmodified lines1314151617181912 unmodified linesconst dispatch = createEventDispatcher<{ modelSelected: string; close: void }>();function handleKeydown(event: KeyboardEvent) {const { key } = event;if (key === "Escape") {event.preventDefault();dispatch("close");12 unmodified lines1314151617181912 unmodified linesconst dispatch = createEventDispatcher<{ modelSelected: string; close: void }>();function handleKeydown(event: KeyboardEvent) {const { key } = event;if (key === "Escape") {event.preventDefault();dispatch("close");
2 unmodified lines3456789101112131422 unmodified lines3738394041424317 unmodified lines616263646566672 unmodified linesimport { HfInference } from "@huggingface/inference";export function createHfInference(token: string): HfInference {return new HfInference(token);}export async function handleStreamingResponse(hf: HfInference,conversation: Conversation,22 unmodified lines}}export async function handleNonStreamingResponse(hf: HfInference,conversation: Conversation,17 unmodified linesthrow new Error("No response from the model");}export function isSystemPromptSupported(model: ModelEntryWithTokenizer) {return model.tokenizerConfig?.chat_template?.includes("system");}2 unmodified lines345678910111222 unmodified lines35363738394017 unmodified lines5859606162632 unmodified linesimport { HfInference } from "@huggingface/inference";export function createHfInference(token: string): HfInference {return new HfInference(token);}export async function handleStreamingResponse(hf: HfInference,conversation: Conversation,22 unmodified lines}}export async function handleNonStreamingResponse(hf: HfInference,conversation: Conversation,17 unmodified linesthrow new Error("No response from the model");}export function isSystemPromptSupported(model: ModelEntryWithTokenizer) {return model.tokenizerConfig?.chat_template?.includes("system");}
src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte+1-1
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+1-1
src/lib/components/InferencePlayground/inferencePlaygroundUtils.ts-4