Marc-André Schenk
commited on
Commit
•
0bd3f4a
1
Parent(s):
0734d7c
let users decide how close they want to stay to the original picture
Browse files- src/routes/+page.svelte +10 -1
src/routes/+page.svelte
CHANGED
@@ -2,6 +2,7 @@
|
|
2 |
import { onMount, tick } from 'svelte';
|
3 |
|
4 |
let txt = '';
|
|
|
5 |
let isLoading = false;
|
6 |
let isOutputControlAdded = false;
|
7 |
let drawingBoard: any;
|
@@ -97,7 +98,7 @@
|
|
97 |
const { imgFile, imgBitmap: initialSketchBitmap } = await getCanvasSnapshot(canvas);
|
98 |
const form = new FormData();
|
99 |
form.append('prompt', txt);
|
100 |
-
form.append('strength',
|
101 |
form.append('image', imgFile);
|
102 |
|
103 |
try {
|
@@ -344,6 +345,14 @@
|
|
344 |
on:keydown={onKeyDown}
|
345 |
bind:value={txt}
|
346 |
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
<button
|
348 |
on:click={submitRequest}
|
349 |
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-1.5 px-4"
|
|
|
2 |
import { onMount, tick } from 'svelte';
|
3 |
|
4 |
let txt = '';
|
5 |
+
let stength = '0.85';
|
6 |
let isLoading = false;
|
7 |
let isOutputControlAdded = false;
|
8 |
let drawingBoard: any;
|
|
|
98 |
const { imgFile, imgBitmap: initialSketchBitmap } = await getCanvasSnapshot(canvas);
|
99 |
const form = new FormData();
|
100 |
form.append('prompt', txt);
|
101 |
+
form.append('strength', strength);
|
102 |
form.append('image', imgFile);
|
103 |
|
104 |
try {
|
|
|
345 |
on:keydown={onKeyDown}
|
346 |
bind:value={txt}
|
347 |
/>
|
348 |
+
<input
|
349 |
+
type="text"
|
350 |
+
class="border-2 py-1"
|
351 |
+
placeholder="0.0 to 1.0"
|
352 |
+
maxlength="10"
|
353 |
+
on:keydown={onKeyDown}
|
354 |
+
bind:value={strength}
|
355 |
+
/>
|
356 |
<button
|
357 |
on:click={submitRequest}
|
358 |
class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-1.5 px-4"
|