Spaces:
Runtime error
Runtime error
wip
Browse filesFiles changed (3)
10 unmodified lines111213141415161710 unmodified lines const dispatch = createEventDispatcher<{ close: void }>();
function handleKeydown(event: KeyboardEvent) { const { key } = event; const { key } = event; if (key === "Escape") { event.preventDefault(); dispatch("close");12 unmodified lines131415161617181912 unmodified lines const dispatch = createEventDispatcher<{ modelSelected: string; close: void }>();
function handleKeydown(event: KeyboardEvent) { const { key } = event; const { key } = event; if (key === "Escape") { event.preventDefault(); dispatch("close");2 unmodified lines345667891110111222 unmodified lines3536374038394017 unmodified lines585960646162632 unmodified lines
import { 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 lines throw 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