Spaces:
				
			
			
	
			
			
					
		Running
		
			on 
			
			CPU Upgrade
	
	
	
			
			
	
	
	
	
		
		
					
		Running
		
			on 
			
			CPU Upgrade
	format
Browse files- src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte +4 -4
- src/lib/components/InferencePlayground/InferencePlaygroundConversation.svelte +1 -1
- src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte +5 -6
- src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte +1 -1
- tailwind.config.ts +1 -1
    	
        src/lib/components/InferencePlayground/InferencePlaygroundCodeSnippets.svelte
    CHANGED
    
    | @@ -293,17 +293,17 @@ print(output.choices[0].message)`, | |
| 293 | 
             
            	</div>
         | 
| 294 |  | 
| 295 | 
             
            	{#each snippetsByLanguage[selectedLanguage] as { label, code, language, needsToken }}
         | 
| 296 | 
            -
            		<div class="flex items-center justify-between px-2 pb-4 pt-6 | 
| 297 | 
             
            			<h2 class="font-semibold">{label}</h2>
         | 
| 298 | 
             
            			<div class="flex items-center gap-x-4">
         | 
| 299 | 
             
            				{#if needsToken && hfToken}
         | 
| 300 | 
            -
            					<label class="flex items-center gap-x-1.5 text-sm | 
| 301 | 
             
            						<input type="checkbox" bind:checked={showToken} />
         | 
| 302 | 
             
            						<p class="leading-none">With token</p>
         | 
| 303 | 
             
            					</label>
         | 
| 304 | 
             
            				{/if}
         | 
| 305 | 
             
            				<button
         | 
| 306 | 
            -
            					class="flex items-center gap-x-2 rounded-md bg-white  | 
| 307 | 
             
            					on:click={e => {
         | 
| 308 | 
             
            						const el = e.currentTarget;
         | 
| 309 | 
             
            						el.classList.add("text-green-500");
         | 
| @@ -316,7 +316,7 @@ print(output.choices[0].message)`, | |
| 316 | 
             
            						}, 400);
         | 
| 317 | 
             
            					}}
         | 
| 318 | 
             
            				>
         | 
| 319 | 
            -
            					<IconCopyCode classNames="text-xs"/> Copy code
         | 
| 320 | 
             
            				</button>
         | 
| 321 | 
             
            			</div>
         | 
| 322 | 
             
            		</div>
         | 
|  | |
| 293 | 
             
            	</div>
         | 
| 294 |  | 
| 295 | 
             
            	{#each snippetsByLanguage[selectedLanguage] as { label, code, language, needsToken }}
         | 
| 296 | 
            +
            		<div class="flex items-center justify-between px-2 pb-4 pt-6">
         | 
| 297 | 
             
            			<h2 class="font-semibold">{label}</h2>
         | 
| 298 | 
             
            			<div class="flex items-center gap-x-4">
         | 
| 299 | 
             
            				{#if needsToken && hfToken}
         | 
| 300 | 
            +
            					<label class="flex select-none items-center gap-x-1.5 text-sm">
         | 
| 301 | 
             
            						<input type="checkbox" bind:checked={showToken} />
         | 
| 302 | 
             
            						<p class="leading-none">With token</p>
         | 
| 303 | 
             
            					</label>
         | 
| 304 | 
             
            				{/if}
         | 
| 305 | 
             
            				<button
         | 
| 306 | 
            +
            					class="flex items-center gap-x-2 rounded-md border bg-white px-1.5 py-0.5 text-sm shadow-sm transition dark:border-gray-800 dark:bg-gray-800"
         | 
| 307 | 
             
            					on:click={e => {
         | 
| 308 | 
             
            						const el = e.currentTarget;
         | 
| 309 | 
             
            						el.classList.add("text-green-500");
         | 
|  | |
| 316 | 
             
            						}, 400);
         | 
| 317 | 
             
            					}}
         | 
| 318 | 
             
            				>
         | 
| 319 | 
            +
            					<IconCopyCode classNames="text-xs" /> Copy code
         | 
| 320 | 
             
            				</button>
         | 
| 321 | 
             
            			</div>
         | 
| 322 | 
             
            		</div>
         | 
    	
        src/lib/components/InferencePlayground/InferencePlaygroundConversation.svelte
    CHANGED
    
    | @@ -49,7 +49,7 @@ | |
| 49 | 
             
            		{/each}
         | 
| 50 |  | 
| 51 | 
             
            		<button
         | 
| 52 | 
            -
            			class="flex px-3.5  | 
| 53 | 
             
            			on:click={() => dispatch("addMessage")}
         | 
| 54 | 
             
            			disabled={loading}
         | 
| 55 | 
             
            		>
         | 
|  | |
| 49 | 
             
            		{/each}
         | 
| 50 |  | 
| 51 | 
             
            		<button
         | 
| 52 | 
            +
            			class="flex px-3.5 py-6 hover:bg-gray-50 md:px-6 dark:hover:bg-gray-800/50"
         | 
| 53 | 
             
            			on:click={() => dispatch("addMessage")}
         | 
| 54 | 
             
            			disabled={loading}
         | 
| 55 | 
             
            		>
         | 
    	
        src/lib/components/InferencePlayground/InferencePlaygroundHFTokenModal.svelte
    CHANGED
    
    | @@ -78,13 +78,13 @@ | |
| 78 | 
             
            			</div>
         | 
| 79 | 
             
            			<!-- Modal body -->
         | 
| 80 | 
             
            			<div class="p-4 md:p-5">
         | 
| 81 | 
            -
            				<p class="text-base leading-relaxed text-gray-800 | 
| 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>
         | 
| 87 | 
            -
            					<label for="hf-token" class="mb-3 block  | 
| 88 | 
             
            						>Hugging Face Token</label
         | 
| 89 | 
             
            					>
         | 
| 90 | 
             
            					<input
         | 
| @@ -96,11 +96,10 @@ | |
| 96 | 
             
            						class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
         | 
| 97 | 
             
            					/>
         | 
| 98 | 
             
            				</div>
         | 
| 99 | 
            -
            				<label class="flex items-center gap-x-1.5 text-gray-900 dark:text-gray-200 | 
| 100 | 
             
            					<input type="checkbox" bind:checked={storeLocallyHfToken} />
         | 
| 101 | 
            -
            					<p class="leading-none | 
| 102 | 
            -
             | 
| 103 | 
            -
            				</label>
         | 
| 104 | 
             
            			</div>
         | 
| 105 |  | 
| 106 | 
             
            			<!-- Modal footer -->
         | 
|  | |
| 78 | 
             
            			</div>
         | 
| 79 | 
             
            			<!-- Modal body -->
         | 
| 80 | 
             
            			<div class="p-4 md:p-5">
         | 
| 81 | 
            +
            				<p class="mb-5 text-base leading-relaxed text-gray-800 2xl:text-balance dark:text-gray-300">
         | 
| 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>
         | 
| 87 | 
            +
            					<label for="hf-token" class="text-smd mb-3 block font-medium text-gray-900 dark:text-white"
         | 
| 88 | 
             
            						>Hugging Face Token</label
         | 
| 89 | 
             
            					>
         | 
| 90 | 
             
            					<input
         | 
|  | |
| 96 | 
             
            						class="block w-full rounded-lg border border-gray-300 bg-gray-50 p-2.5 text-sm text-gray-900 focus:border-blue-500 focus:ring-blue-500 dark:border-gray-600 dark:bg-gray-700 dark:text-white dark:placeholder-gray-400 dark:focus:border-blue-500 dark:focus:ring-blue-500"
         | 
| 97 | 
             
            					/>
         | 
| 98 | 
             
            				</div>
         | 
| 99 | 
            +
            				<label class="mt-4 flex items-center gap-x-1.5 text-gray-900 dark:text-gray-200">
         | 
| 100 | 
             
            					<input type="checkbox" bind:checked={storeLocallyHfToken} />
         | 
| 101 | 
            +
            					<p class="text-sm leading-none">Save to local storage for future use</p></label
         | 
| 102 | 
            +
            				>
         | 
|  | |
| 103 | 
             
            			</div>
         | 
| 104 |  | 
| 105 | 
             
            			<!-- Modal footer -->
         | 
    	
        src/lib/components/InferencePlayground/InferencePlaygroundModelSelector.svelte
    CHANGED
    
    | @@ -54,7 +54,7 @@ | |
| 54 | 
             
            	</label>
         | 
| 55 |  | 
| 56 | 
             
            	<button
         | 
| 57 | 
            -
            		class="flex items-center justify-between  | 
| 58 | 
             
            		on:click={() => (showModelPickerModal = true)}
         | 
| 59 | 
             
            	>
         | 
| 60 | 
             
            		<div class="flex flex-col items-start">
         | 
|  | |
| 54 | 
             
            	</label>
         | 
| 55 |  | 
| 56 | 
             
            	<button
         | 
| 57 | 
            +
            		class="relative 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 hover:brightness-95 dark:border-gray-700 dark:bg-gray-800 dark:hover:brightness-110"
         | 
| 58 | 
             
            		on:click={() => (showModelPickerModal = true)}
         | 
| 59 | 
             
            	>
         | 
| 60 | 
             
            		<div class="flex flex-col items-start">
         | 
    	
        tailwind.config.ts
    CHANGED
    
    | @@ -3,7 +3,7 @@ import containerQueries from "@tailwindcss/container-queries"; | |
| 3 |  | 
| 4 | 
             
            export default {
         | 
| 5 | 
             
            	content: ["./src/**/*.{html,js,svelte,ts}"],
         | 
| 6 | 
            -
            	darkMode:  | 
| 7 | 
             
            	theme: {
         | 
| 8 | 
             
            		extend: {},
         | 
| 9 | 
             
            	},
         | 
|  | |
| 3 |  | 
| 4 | 
             
            export default {
         | 
| 5 | 
             
            	content: ["./src/**/*.{html,js,svelte,ts}"],
         | 
| 6 | 
            +
            	darkMode: "selector",
         | 
| 7 | 
             
            	theme: {
         | 
| 8 | 
             
            		extend: {},
         | 
| 9 | 
             
            	},
         | 

