-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Evzen Gasta <evzen.ml@seznam.cz>
- Loading branch information
Showing
7 changed files
with
146 additions
and
0 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
85 changes: 85 additions & 0 deletions
85
packages/frontend/src/pages/instruct-lab/AboutInstructLab.svelte
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,85 @@ | ||
<script lang="ts"> | ||
import { faPlusCircle } from '@fortawesome/free-solid-svg-icons'; | ||
import { NavPage, Button, Link } from '@podman-desktop/ui-svelte'; | ||
import { studioClient } from '/@/utils/client'; | ||
import { router } from 'tinro'; | ||
import instructlabTitleImage from '/@/lib/images/instructlabTitleImage.png'; | ||
import AboutInstructLabDiscoverCard from './AboutInstructLabDiscoverCard.svelte'; | ||
import AboutInstructLabExploreCard from './AboutInstructLabExploreCard.svelte'; | ||
function start(): void { | ||
router.goto('/tune/start'); | ||
} | ||
const instructLabDocumentation = 'https://docs.instructlab.ai/'; | ||
const instructLabHuggingFace = 'https://huggingface.co/instructlab'; | ||
const instructLabSamples = ''; | ||
async function openInstructLabDocumentation(): Promise<void> { | ||
await studioClient.openURL(instructLabDocumentation); | ||
} | ||
async function openInstructLabHuggingFace(): Promise<void> { | ||
await studioClient.openURL(instructLabHuggingFace); | ||
} | ||
async function openSamples(): Promise<void> { | ||
await studioClient.openURL(instructLabSamples); | ||
} | ||
</script> | ||
|
||
<NavPage title="About InstructLab" searchEnabled={false}> | ||
<div slot="additional-actions"> | ||
<Button icon={faPlusCircle} on:click={start}>Start Fine Tuning</Button> | ||
</div> | ||
<div slot="content" class="flex flex-col min-w-full min-h-full"> | ||
<div class="min-w-full min-h-full flex-1"> | ||
<div class="text-[var(--pd-details-body-text)] mt-4 px-5 space-y-5" aria-label="inner-content"> | ||
<div class="flex bg-[var(--pd-content-card-bg)] rounded-md p-5 gap-3 flex-row flex-nowrap items-center"> | ||
<img | ||
src={instructlabTitleImage} | ||
class="max-h-[100%] w-auto max-w-[20%] object-contain rounded-md self-start" | ||
alt={`InstructLab`} /> | ||
<div class="flex flex-col flex-1 h-100% self-start gap-4"> | ||
<div | ||
class="text-[var(--pd-content-card-text)] truncate text-ellipsis overflow-hidden whitespace-pre-line flex flex-col gap-4"> | ||
<div> | ||
Here you can create an InstructLab session to improve trained models with specialized knowledge and | ||
skill tuning. InstructLab is a model-agnostic open source AI project that facilitates contributions to | ||
Large Language Models (LLMs). | ||
</div> | ||
<div>Start by trying one of our samples or bring your own knowledge and skills files.</div> | ||
</div> | ||
<div class="flex flex-row justify-start items-center gap-3 mt-2"> | ||
<Link on:click={openInstructLabDocumentation}>Access InstructLab documentation</Link> | ||
<Link on:click={openInstructLabHuggingFace}>View InstructLab on HuggingFace</Link> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<div class="flex flex-1 flex-col pt-5"> | ||
<p class="text-xl text-[var(--pd-details-body-text)]"> | ||
Discover from available <Link on:click={openSamples} class="font-bold">SAMPLES</Link> | ||
</p> | ||
<div class="flex flex-col pt-5 grow"> | ||
<div class="grid grid-cols-3 gap-x-2"> | ||
<AboutInstructLabDiscoverCard title={'asdas'} link={'asd'} image={instructlabTitleImage} desc={'aaaa'} /> | ||
<AboutInstructLabDiscoverCard title={'asdas'} link={'asd'} image={instructlabTitleImage} desc={'aaaa'} /> | ||
<AboutInstructLabDiscoverCard title={'asdas'} link={'asd'} image={instructlabTitleImage} desc={'aaaa'} /> | ||
</div> | ||
</div> | ||
</div> | ||
<div class="flex flex-1 flex-col py-5"> | ||
<p class="text-xl text-[var(--pd-details-body-text)]">Explore articles and videos</p> | ||
<div class="rounded-md mt-5 bg-[var(--pd-content-card-bg)] flex-row flex-nowrap justify-center items-center"> | ||
<div class="grid grid-cols-3 p-2"> | ||
<AboutInstructLabExploreCard title={'asdas'} link={'asd'} image={instructlabTitleImage} isVideo={true} /> | ||
<AboutInstructLabExploreCard title={'asdas'} link={'asd'} image={instructlabTitleImage} /> | ||
<AboutInstructLabExploreCard title={'asdas'} link={'asd'} image={instructlabTitleImage} /> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</NavPage> |
25 changes: 25 additions & 0 deletions
25
packages/frontend/src/pages/instruct-lab/AboutInstructLabDiscoverCard.svelte
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,25 @@ | ||
<script lang="ts"> | ||
import { Button } from '@podman-desktop/ui-svelte'; | ||
import { studioClient } from '/@/utils/client'; | ||
interface Props { | ||
title: string; | ||
desc: string; | ||
link: string; | ||
image: string; | ||
} | ||
let { title, desc, link, image }: Props = $props(); | ||
async function openLink(): Promise<void> { | ||
await studioClient.openURL(link); | ||
} | ||
</script> | ||
|
||
<div | ||
class="flex flex-col items-center justify-top rounded-md text-white relative bg-cover bg-center h-[300px]" | ||
style={`background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0) 80%), url(${image});`}> | ||
<div class="text-lg font-bold mt-2">{title}</div> | ||
<div class="text-sm my-2">{desc}</div> | ||
<Button on:click={openLink}>Get started</Button> | ||
</div> |
26 changes: 26 additions & 0 deletions
26
packages/frontend/src/pages/instruct-lab/AboutInstructLabExploreCard.svelte
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,26 @@ | ||
<script lang="ts"> | ||
import { Button } from '@podman-desktop/ui-svelte'; | ||
import { studioClient } from '/@/utils/client'; | ||
interface Props { | ||
title?: string; | ||
link: string; | ||
image: string; | ||
isVideo?: boolean; | ||
} | ||
let { title, link, image, isVideo = false }: Props = $props(); | ||
async function openLink(): Promise<void> { | ||
await studioClient.openURL(link); | ||
} | ||
</script> | ||
|
||
<div | ||
class="flex flex-col gap-4 m-2 bg-[var(--pd-content-card-carousel-card-bg)] hover:bg-[var(--pd-content-card-carousel-card-hover-bg)] rounded-md items-center"> | ||
<img src={image} class="object-contain rounded-md w-full" alt={`${title} image`} /> | ||
{#if !isVideo} | ||
<div class="text-[var(--pd-content-card-carousel-card-header-text)] text-center font-semibold">{title}</div> | ||
{/if} | ||
<Button on:click={openLink} class="self-center mb-2">{isVideo ? 'Watch' : 'Read more'}</Button> | ||
</div> |