Spaces:
Runtime error
Runtime error
order imports
Browse filesFiles changed (8)
- src/lib/components/InferencePlayground/InferencePlayground.svelte+6-4
- src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte+4-2
- src/lib/components/InferencePlayground/InferencePlaygroundConversation.svelte+3-1
- src/lib/components/InferencePlayground/InferencePlaygroundGenerationConfig.svelte+1
- src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte+3-2
- src/lib/components/InferencePlayground/InferencePlaygroundMessage.svelte+1-1
- src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte+1
- src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+2
123456789101112131415161718<script lang="ts">import {createHfInference,handleStreamingResponse,handleNonStreamingResponse,isSystemPromptSupported,} from "./inferencePlaygroundUtils";import GenerationConfig from "./InferencePlaygroundGenerationConfig.svelte";import HFTokenModal from "./InferencePlaygroundHFTokenModal.svelte";import ModelSelector from "./InferencePlaygroundModelSelector.svelte";import Conversation from "./InferencePlaygroundConversation.svelte";import { onDestroy } from "svelte";import { type ChatCompletionInputMessage } from "@huggingface/tasks";import type { ModelEntryWithTokenizer } from "$lib/types";import { defaultGenerationConfig } from "./generationConfigSettings";import IconShare from "../Icons/IconShare.svelte";import IconDelete from "../Icons/IconDelete.svelte";import IconCode from "../Icons/IconCode.svelte";1234567891011121314151617181920<script lang="ts">import type { ModelEntryWithTokenizer } from "$lib/types";import { type ChatCompletionInputMessage } from "@huggingface/tasks";import { defaultGenerationConfig } from "./generationConfigSettings";import {createHfInference,handleStreamingResponse,handleNonStreamingResponse,isSystemPromptSupported,} from "./inferencePlaygroundUtils";import { onDestroy } from "svelte";import GenerationConfig from "./InferencePlaygroundGenerationConfig.svelte";import HFTokenModal from "./InferencePlaygroundHFTokenModal.svelte";import ModelSelector from "./InferencePlaygroundModelSelector.svelte";import Conversation from "./InferencePlaygroundConversation.svelte";import IconShare from "../Icons/IconShare.svelte";import IconDelete from "../Icons/IconDelete.svelte";import IconCode from "../Icons/IconCode.svelte";
1234567891011<script lang="ts">import hljs from "highlight.js/lib/core";import javascript from "highlight.js/lib/languages/javascript";import python from "highlight.js/lib/languages/python";import http from "highlight.js/lib/languages/http";import type { Conversation } from "$lib/types";import IconCopyCode from "../Icons/IconCopyCode.svelte";import { onDestroy } from "svelte";hljs.registerLanguage("javascript", javascript);hljs.registerLanguage("python", python);12345678910111213<script lang="ts">import type { Conversation } from "$lib/types";import { onDestroy } from "svelte";import hljs from "highlight.js/lib/core";import javascript from "highlight.js/lib/languages/javascript";import python from "highlight.js/lib/languages/python";import http from "highlight.js/lib/languages/http";import IconCopyCode from "../Icons/IconCopyCode.svelte";hljs.registerLanguage("javascript", javascript);hljs.registerLanguage("python", python);
123456789<script lang="ts">import { createEventDispatcher } from "svelte";import CodeSnippets from "./InferencePlaygroundCodeSnippets.svelte";import Message from "./InferencePlaygroundMessage.svelte";import IconPlus from "../Icons/IconPlus.svelte";import type { Conversation } from "$lib/types";export let loading;export let conversation: Conversation;1234567891011<script lang="ts">import type { Conversation } from "$lib/types";import { createEventDispatcher } from "svelte";import CodeSnippets from "./InferencePlaygroundCodeSnippets.svelte";import Message from "./InferencePlaygroundMessage.svelte";import IconPlus from "../Icons/IconPlus.svelte";export let loading;export let conversation: Conversation;
12345<script lang="ts">import type { Conversation } from "$lib/types";import {GENERATION_CONFIG_KEYS,GENERATION_CONFIG_KEYS_ADVANCED,123456<script lang="ts">import type { Conversation } from "$lib/types";import {GENERATION_CONFIG_KEYS,GENERATION_CONFIG_KEYS_ADVANCED,
1234567<!-- Main modal --><script lang="ts">import { createEventDispatcher, onDestroy, onMount } from "svelte";import { browser } from "$app/environment";import IconCross from "../Icons/IconCross.svelte";let backdropEl: HTMLDivElement;12345678<script lang="ts">import { browser } from "$app/environment";import { createEventDispatcher, onDestroy, onMount } from "svelte";import IconCross from "../Icons/IconCross.svelte";let backdropEl: HTMLDivElement;
123456<script lang="ts">import { createEventDispatcher } from "svelte";import { type ChatCompletionInputMessage } from "@huggingface/tasks";export let message: ChatCompletionInputMessage;export let autofocus: boolean = false;123456<script lang="ts">import { type ChatCompletionInputMessage } from "@huggingface/tasks";import { createEventDispatcher } from "svelte";export let message: ChatCompletionInputMessage;export let autofocus: boolean = false;
12345<script lang="ts">import type { Conversation, ModelEntryWithTokenizer } from "$lib/types";import IconCaret from "../Icons/IconCaret.svelte";import ModelSelectorModal from "./InferencePlaygroundModelSelectorModal.svelte";123456<script lang="ts">import type { Conversation, ModelEntryWithTokenizer } from "$lib/types";import IconCaret from "../Icons/IconCaret.svelte";import ModelSelectorModal from "./InferencePlaygroundModelSelectorModal.svelte";
123456<script lang="ts">import type { ModelEntryWithTokenizer } from "$lib/types";import { createEventDispatcher } from "svelte";import IconSearch from "../Icons/IconSearch.svelte";import IconStar from "../Icons/IconStar.svelte";12345678<script lang="ts">import type { ModelEntryWithTokenizer } from "$lib/types";import { createEventDispatcher } from "svelte";import IconSearch from "../Icons/IconSearch.svelte";import IconStar from "../Icons/IconStar.svelte";
src/lib/components/InferencePlayground/InferencePlayground.svelte+6-4
src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte+4-2
src/lib/components/InferencePlayground/InferencePlaygroundConversation.svelte+3-1
src/lib/components/InferencePlayground/InferencePlaygroundGenerationConfig.svelte+1
src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte+3-2
src/lib/components/InferencePlayground/InferencePlaygroundMessage.svelte+1-1
src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte+1
src/lib/components/InferencePlayground/InferencePlaygroundModelSelectorModal.svelte+2