Spaces:
Running
Running
Juno360219
commited on
Commit
·
7d0aab4
1
Parent(s):
a700c41
Add 1 files
Browse files- index.html +15 -19
index.html
CHANGED
@@ -1,19 +1,15 @@
|
|
1 |
-
|
2 |
-
<
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
</p>
|
17 |
-
</div>
|
18 |
-
</body>
|
19 |
-
</html>
|
|
|
1 |
+
<html><head><link href="https://cdn.jsdelivr.net/npm/daisyui@3.1.6/dist/full.css" rel="stylesheet" type="text/css" /><script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script><script src="https://cdn.tailwindcss.com?plugins=forms,typography,aspect-ratio"></script><script defer src="https://cdnjs.cloudflare.com/ajax/libs/three.js/0.156.1/three.min.js"></script><script type="module" src="main.js"></script><title>Image2Image</title></head><body><main class="prose" x-data="{ load: false, message: 'Loading...', processing: false, sourceImage: null, outputImage: null }" x-effect="if (!load) { message = 'Loading...'; processing = true; fetch('/image/input').then(response => response.ok ? response.json() : {}) }">
|
2 |
+
<div class="flex items-center justify-center">
|
3 |
+
<div class="mb-4">
|
4 |
+
<input type="file" class="block w-full" x-ref="sourceImageInput" x-on:change="fileSelected" />
|
5 |
+
</div>
|
6 |
+
<div x-show="message.length" class="mb-4 text-xs text-gray-600">
|
7 |
+
{{ message }}
|
8 |
+
</div>
|
9 |
+
<div x-show="outputImage" x-on:click="download" class="px-2 py-2 mb-4 text-xs text-white font-bold rounded-md bg-black border shadow-md text-center">
|
10 |
+
{{ outputImage ? outputImage : 'Click to Download' }}
|
11 |
+
</div>
|
12 |
+
<button type="button" x-show="sourceImage" x-on:click="processImage" class="px-4 py-2 font-bold rounded-md bg-black border shadow-md">Process Image</button>
|
13 |
+
</div>
|
14 |
+
</main>
|
15 |
+
</body></html>
|
|
|
|
|
|
|
|