-
Notifications
You must be signed in to change notification settings - Fork 192
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: Yue, Wenjiao <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
- Loading branch information
1 parent
a2745b2
commit fa12083
Showing
8 changed files
with
116 additions
and
85 deletions.
There are no files selected for viewing
Binary file added
BIN
+61.1 KB
VisualQnA/docker/ui/svelte/src/lib/assets/imageData/extreme_ironing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions
10
VisualQnA/docker/ui/svelte/src/lib/assets/imageData/images.json
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,10 @@ | ||
[ | ||
{ | ||
"src": "/extreme_ironing.jpg", | ||
"prompt": "what is unusual about this image?" | ||
}, | ||
{ | ||
"src": "/waterview.jpg", | ||
"prompt": "what are the things I should be cautious about when I visit here?" | ||
} | ||
] |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
|
@@ -4,57 +4,29 @@ | |
--> | ||
|
||
<script lang="ts"> | ||
import { Card, Button, Hr, Label, Input } from "flowbite-svelte"; | ||
import { Hr, Label, Input } from "flowbite-svelte"; | ||
import UploadImg from "./uploadImg.svelte"; | ||
import { Tooltip } from "flowbite-svelte"; | ||
import { Range } from "flowbite-svelte"; | ||
import Help from "$lib/assets/upload/help.svelte"; | ||
import { EnvelopeSolid } from "flowbite-svelte-icons"; | ||
import { FilePasteSolid } from "flowbite-svelte-icons"; | ||
import { stepValueStore } from "$lib/shared/stores/common/Store"; | ||
let stepValue = 512; | ||
let UseShow = false; | ||
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 /> | ||
<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 id="email" type="email" placeholder="[email protected]"> | ||
<EnvelopeSolid slot="left" class="w-5 h-5 text-gray-500 dark:text-gray-400" /> | ||
<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 class="flex flex-row justify-between pb-4"> | ||
<button | ||
class="text-#eee gap-2 bg-white p-0 hover:bg-[white] flex flex-row items-center" | ||
on:click={() => { | ||
UseShow = !UseShow; | ||
}}><Help />Help Centre</button | ||
> | ||
<div class="mt-4 flex space-x-3"> | ||
<Button color="light" class="dark:text-white">Cancel</Button> | ||
<Button>Done</Button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{#if UseShow} | ||
<div class="mt-5 flex w-full flex-col gap-3 rounded-xl bg-white p-5"> | ||
<p>Terms of use</p> | ||
<p> | ||
By using this service, users are required to agree to the following terms: | ||
The service is a research preview intended for non-commercial use only. It | ||
only provides limited safety measures and may generate offensive content. | ||
It must not be used for any illegal, harmful, violent, racist, or sexual | ||
purposes. The service may collect user dialogue data for future research. | ||
Please click the "Flag" button if you get any inappropriate answer! We | ||
will collect those to keep improving our moderator. For an optimal | ||
experience, please use desktop computers for this demo, as mobile devices | ||
may compromise its quality. | ||
</p> | ||
</div> | ||
{/if} |
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
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