-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleanup, added examples, hardened usage against edge cases
- Loading branch information
Showing
24 changed files
with
911 additions
and
361 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,5 @@ node_modules | |
!.env.example | ||
vite.config.js.timestamp-* | ||
vite.config.ts.timestamp-* | ||
|
||
archive/ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
export let title: string; | ||
export let description: string; | ||
export let link: string; | ||
</script> | ||
|
||
<div class="bg-gray-100 p-6 rounded-m"> | ||
<h2 class="text-2xl font-bold mb-2">{title}</h2> | ||
<p class="mb-4"> | ||
{description} | ||
</p> | ||
<a href={link} class="text-blue-500 hover:underline">{title} Demo</a> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<script lang="ts"> | ||
export let header: string | undefined = undefined; | ||
</script> | ||
|
||
<div class="w-full mt-4"> | ||
{#if header} | ||
<h2 class="text-center text-lg font-bold">{header}</h2> | ||
{/if} | ||
<slot /> | ||
</div> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<script lang="ts" context="module"> | ||
export interface Line { | ||
command: string; | ||
output: string; | ||
} | ||
</script> | ||
|
||
<script lang="ts"> | ||
export let lines: Line[] = []; | ||
</script> | ||
|
||
<section class="terminal"> | ||
<div class="bar"> | ||
<svg xmlns="http://www.w3.org/2000/svg" width="54" height="14" viewBox="0 0 54 14"> | ||
<g fill="none" fill-rule="evenodd" transform="translate(1 1)"> | ||
<circle cx="6" cy="6" r="6" fill="#FF5F56" stroke="#E0443E" stroke-width=".5" /> | ||
<circle cx="26" cy="6" r="6" fill="#FFBD2E" stroke="#DEA123" stroke-width=".5" /> | ||
<circle cx="46" cy="6" r="6" fill="#27C93F" stroke="#1AAB29" stroke-width=".5" /> | ||
</g> | ||
</svg> | ||
</div> | ||
|
||
{#each lines as line} | ||
<p> | ||
<span class="prompt">></span> | ||
{line.command} | ||
</p> | ||
|
||
{#if line.output} | ||
<p class="output"> | ||
{#each line.output.split('\n') as outputLine} | ||
{outputLine}<br /> | ||
{/each} | ||
</p> | ||
{/if} | ||
{/each} | ||
</section> | ||
|
||
<style> | ||
.terminal { | ||
font-family: monospace; | ||
background: #333; | ||
padding: 0.7rem 1rem; | ||
border-radius: 0.5rem; | ||
color: #b8b8b8; | ||
overflow: hidden; | ||
} | ||
.terminal .bar { | ||
margin-bottom: 1rem; | ||
} | ||
.prompt { | ||
color: #27c93f; | ||
font-weight: bold; | ||
} | ||
p { | ||
margin: 0.2rem 0; | ||
} | ||
p.output { | ||
font-weight: normal; | ||
white-space: pre; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,39 @@ | ||
<script lang="ts"> | ||
import DemoItem from '../components/DemoItem.svelte'; | ||
import Section from '../components/Section.svelte'; | ||
const demos = [ | ||
{ | ||
title: 'Text Generation', | ||
description: | ||
'Use the same Llama 2 models in multiple environments with the llama2 component.', | ||
link: '/llama2' | ||
}, | ||
{ | ||
title: 'Text Redaction', | ||
description: | ||
'Ensure consistent PII redaction across different languages and different environments by using the exact same binaries.', | ||
link: '/redact' | ||
}, | ||
{ | ||
title: 'Object Recognition', | ||
description: 'Use YOLOv8 AI models to detect objects in image frames.', | ||
link: '/yolo' | ||
} | ||
]; | ||
</script> | ||
|
||
<div class="container mx-auto p-6"> | ||
<div class="text-center"> | ||
<img src="wick_logo.png" alt="Wick Framework Logo" class="w-96 mx-auto mb-4" /> | ||
<p class="text-xl mb-4"> | ||
Unleash the true potential of WebAssembly. Run the same code on the server, client, mobile, | ||
command line, APIs, workers, anywhere. | ||
</p> | ||
<p class="text-xl mb-4">Bring WebAssembly Everywhere.</p> | ||
<p>Run the same binaries on the server, client, mobile, CLI, APIs, workers, and beyond.</p> | ||
</div> | ||
|
||
</div> | ||
<Section> | ||
<div class="grid grid-cols-1 md:grid-cols-2 gap-8"> | ||
<div class="bg-gray-100 p-6 rounded-md"> | ||
<h2 class="text-2xl font-bold mb-2">Llama2</h2> | ||
<p class="mb-4"> | ||
Dramatically reduce server compute costs with Wick by running the same models on the client | ||
as you do the server. | ||
</p> | ||
<a href="/llama2" class="text-blue-500 hover:underline">Llama2 Example</a> | ||
</div> | ||
|
||
<div class="bg-gray-100 p-6 rounded-md"> | ||
<h2 class="text-2xl font-bold mb-2">Text Redaction</h2> | ||
<p class="mb-4"> | ||
Consistent redact PII across different languages and different environments, from server to | ||
edge to client. | ||
</p> | ||
<a href="/redact" class="text-blue-500 hover:underline">Redaction Example</a> | ||
</div> | ||
{#each demos as demo} | ||
<DemoItem {...demo} /> | ||
{/each} | ||
</div> | ||
</div> | ||
</Section> |
Oops, something went wrong.