Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add imagePrompt to display default image hint #777

Merged
merged 8 commits into from
Sep 11, 2024
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!--
Copyright (C) 2024 Intel Corporation
SPDX-License-Identifier: Apache-2.0
-->

<script lang="ts">
import { Hr, Label, Input } from "flowbite-svelte";
import UploadImg from "./uploadImg.svelte";

import { Range } from "flowbite-svelte";
import { FilePasteSolid } from "flowbite-svelte-icons";
import { stepValueStore } from "$lib/shared/stores/common/Store";
let stepValue = 512;
let imageUrl = '';

$: stepValueStore.set(stepValue);
</script>

<div class="flex w-full flex-col gap-3 rounded-xl bg-white p-5">
<p>Upload Images</p>
<UploadImg imageUrl={imageUrl}/>
<Hr classHr="my-8 w-64">or</Hr>
<div class="mb-6">
<Label for="input-group-1" class="block mb-2">Import from URL</Label>
<Input type="text" placeholder="" bind:value={imageUrl}>
<FilePasteSolid slot="left" class="w-5 h-5 text-gray-500 dark:text-gray-400" />
</Input>
</div>
<p>Parameters</p>
<Range id="range-steps" min="0" max="1024" bind:value={stepValue} step="1" />
<p>Max output tokens: {stepValue}</p>
</div>
2 changes: 2 additions & 0 deletions VisualQnA/docker/ui/svelte/src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import Scrollbar from "$lib/shared/components/scrollbar/Scrollbar.svelte";
import ChatMessage from "$lib/modules/chat/ChatMessage.svelte";
import Upload from "$lib/modules/upload/upload.svelte";
import ImagePrompt from "$lib/modules/upload/imagePrompt.svelte";

let query: string = "";
let loading: boolean = false;
Expand Down Expand Up @@ -183,6 +184,7 @@
>
<div class="w-1/5 bg-gray-200 p-4">
<Upload />
<ImagePrompt />
</div>
<div class="flex-1 bg-gray-100 p-4">
<div class="mx-auto flex h-full w-full flex-col sm:mt-0 sm:w-[80%] bg-white px-10">
Expand Down
Loading