Spaces:
Build error
Build error
spinning, close
Browse files
frontend/src/lib/ResultCanvas.svelte
CHANGED
@@ -115,14 +115,39 @@
|
|
115 |
}
|
116 |
</script>
|
117 |
|
118 |
-
|
119 |
-
|
120 |
-
<img
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
|
|
|
124 |
<style lang="postcss" scoped>
|
125 |
.image {
|
126 |
@apply box-border z-0 border dark:border-gray-300 border-gray-500 aspect-[256/512];
|
127 |
}
|
|
|
|
|
|
|
128 |
</style>
|
|
|
115 |
}
|
116 |
</script>
|
117 |
|
118 |
+
<div class="relative overflow-clip flex flex-col justify-center w-full h-full">
|
119 |
+
{#if $resultImage}
|
120 |
+
<img
|
121 |
+
class="image {$generateHuman ? 'opacity-30' : ''}"
|
122 |
+
alt="Generative Human Result"
|
123 |
+
src={$resultImage}
|
124 |
+
width="256"
|
125 |
+
height="512"
|
126 |
+
/>
|
127 |
+
{/if}
|
128 |
+
{#if $generateHuman}
|
129 |
+
<div class="loading">
|
130 |
+
<svg
|
131 |
+
xmlns="http://www.w3.org/2000/svg"
|
132 |
+
fill="none"
|
133 |
+
viewBox="0 0 24 24"
|
134 |
+
class="animate-spin max-w-[3rem]"
|
135 |
+
>
|
136 |
+
<path
|
137 |
+
fill="currentColor"
|
138 |
+
d="M20 12a8 8 0 0 1-8 8v4a12 12 0 0 0 12-12h-4Zm-2-5.3a8 8 0 0 1 2 5.3h4c0-3-1.1-5.8-3-8l-3 2.7Z"
|
139 |
+
/>
|
140 |
+
</svg>
|
141 |
+
</div>
|
142 |
+
{/if}
|
143 |
+
</div>
|
144 |
|
145 |
+
<!-- {/if} -->
|
146 |
<style lang="postcss" scoped>
|
147 |
.image {
|
148 |
@apply box-border z-0 border dark:border-gray-300 border-gray-500 aspect-[256/512];
|
149 |
}
|
150 |
+
.loading {
|
151 |
+
@apply absolute top-0 left-0 right-0 bottom-0 flex justify-center items-center;
|
152 |
+
}
|
153 |
</style>
|
frontend/src/routes/index.svelte
CHANGED
@@ -33,7 +33,7 @@
|
|
33 |
<a href="https://huggingface.co/hysts" target="_blank">@hysts</a> for the original Space implementation
|
34 |
</p>
|
35 |
</small>
|
36 |
-
<details
|
37 |
<summary class="cursor-pointer"> <small>More</small> </summary>
|
38 |
<p>
|
39 |
The backend is powered by a <a href="https://gradio.app/" target="_blank">Gradio</a>
|
@@ -53,9 +53,7 @@
|
|
53 |
<TemplateGallery />
|
54 |
<div class="drawings py-3 -mx-3">
|
55 |
<DrawingCanvas />
|
56 |
-
<!-- {#if results} -->
|
57 |
<ResultCanvas />
|
58 |
-
<!-- {/if} -->
|
59 |
</div>
|
60 |
<button
|
61 |
on:click|preventDefault={() => ($generateHuman = true)}
|
|
|
33 |
<a href="https://huggingface.co/hysts" target="_blank">@hysts</a> for the original Space implementation
|
34 |
</p>
|
35 |
</small>
|
36 |
+
<details>
|
37 |
<summary class="cursor-pointer"> <small>More</small> </summary>
|
38 |
<p>
|
39 |
The backend is powered by a <a href="https://gradio.app/" target="_blank">Gradio</a>
|
|
|
53 |
<TemplateGallery />
|
54 |
<div class="drawings py-3 -mx-3">
|
55 |
<DrawingCanvas />
|
|
|
56 |
<ResultCanvas />
|
|
|
57 |
</div>
|
58 |
<button
|
59 |
on:click|preventDefault={() => ($generateHuman = true)}
|