Juno360219 commited on
Commit
7d0aab4
1 Parent(s): a700c41

Add 1 files

Browse files
Files changed (1) hide show
  1. index.html +15 -19
index.html CHANGED
@@ -1,19 +1,15 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
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>