update
Browse files- static/index.js +1 -9
- templates/index.html +11 -5
static/index.js
CHANGED
|
@@ -20,7 +20,7 @@ function setInferInterval() {
|
|
| 20 |
console.log(data);
|
| 21 |
if (data == false) {
|
| 22 |
console.log("GPU is not available. Use CPU for inference.");
|
| 23 |
-
infer_interval =
|
| 24 |
}
|
| 25 |
else {
|
| 26 |
console.log("GPU is available. Use GPU for inference.");
|
|
@@ -223,8 +223,6 @@ domainSlider.addEventListener("change", function () {
|
|
| 223 |
|
| 224 |
// post data to server for recognition
|
| 225 |
function onRecognition(range) {
|
| 226 |
-
console.time("predict");
|
| 227 |
-
|
| 228 |
$.ajax({
|
| 229 |
url: './predict',
|
| 230 |
type: 'POST',
|
|
@@ -242,13 +240,9 @@ function onRecognition(range) {
|
|
| 242 |
console.log(XMLHttpRequest);
|
| 243 |
alert("error");
|
| 244 |
})
|
| 245 |
-
|
| 246 |
-
console.timeEnd("predict");
|
| 247 |
}
|
| 248 |
|
| 249 |
function onRecognition_random(range) {
|
| 250 |
-
console.time("predict");
|
| 251 |
-
|
| 252 |
$.ajax({
|
| 253 |
url: './predict_random',
|
| 254 |
type: 'POST',
|
|
@@ -266,8 +260,6 @@ function onRecognition_random(range) {
|
|
| 266 |
console.log(XMLHttpRequest);
|
| 267 |
alert("error");
|
| 268 |
})
|
| 269 |
-
|
| 270 |
-
console.timeEnd("predict");
|
| 271 |
}
|
| 272 |
|
| 273 |
function drawImgToCanvas(canvasId, b64Img) {
|
|
|
|
| 20 |
console.log(data);
|
| 21 |
if (data == false) {
|
| 22 |
console.log("GPU is not available. Use CPU for inference.");
|
| 23 |
+
infer_interval = 5000;
|
| 24 |
}
|
| 25 |
else {
|
| 26 |
console.log("GPU is available. Use GPU for inference.");
|
|
|
|
| 223 |
|
| 224 |
// post data to server for recognition
|
| 225 |
function onRecognition(range) {
|
|
|
|
|
|
|
| 226 |
$.ajax({
|
| 227 |
url: './predict',
|
| 228 |
type: 'POST',
|
|
|
|
| 240 |
console.log(XMLHttpRequest);
|
| 241 |
alert("error");
|
| 242 |
})
|
|
|
|
|
|
|
| 243 |
}
|
| 244 |
|
| 245 |
function onRecognition_random(range) {
|
|
|
|
|
|
|
| 246 |
$.ajax({
|
| 247 |
url: './predict_random',
|
| 248 |
type: 'POST',
|
|
|
|
| 260 |
console.log(XMLHttpRequest);
|
| 261 |
alert("error");
|
| 262 |
})
|
|
|
|
|
|
|
| 263 |
}
|
| 264 |
|
| 265 |
function drawImgToCanvas(canvasId, b64Img) {
|
templates/index.html
CHANGED
|
@@ -10,15 +10,21 @@
|
|
| 10 |
|
| 11 |
<h1 style="text-align: center; font-size: 40px; font-family: 'Times New Roman', Times, serif;">
|
| 12 |
Controllable Multi-domain Semantic Artwork Synthesis
|
|
|
|
| 13 |
</h1>
|
| 14 |
<p style="text-align: center; font-size: 20px; font-family: 'Times New Roman', Times, serif;">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
<a href="https://sky24h.github.io/websites/cvmj2023_controllable-artwork-synthesis/" target="_blank">
|
| 16 |
-
|
| 17 |
-
|
| 18 |
</a>
|
| 19 |
-
|
| 20 |
-
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm.svg#center" alt="Duplicate Space">
|
| 21 |
-
</a>
|
| 22 |
</p>
|
| 23 |
<hr class="solid">
|
| 24 |
|
|
|
|
| 10 |
|
| 11 |
<h1 style="text-align: center; font-size: 40px; font-family: 'Times New Roman', Times, serif;">
|
| 12 |
Controllable Multi-domain Semantic Artwork Synthesis
|
| 13 |
+
</a>
|
| 14 |
</h1>
|
| 15 |
<p style="text-align: center; font-size: 20px; font-family: 'Times New Roman', Times, serif;">
|
| 16 |
+
<!-- Duplicate this space on GPU to speedup. (Inference Time: 3500ms for CPU, 200ms for GPU.): -->
|
| 17 |
+
<a style="text-align: center; display:inline-block"
|
| 18 |
+
href="https://huggingface.co/spaces/sky24h/Controllable_Multi-domain_Semantic_Artwork_Synthesis?duplicate=true">
|
| 19 |
+
<img src="https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-sm.svg#center"
|
| 20 |
+
alt="Duplicate Space">
|
| 21 |
+
</a>
|
| 22 |
+
|
| 23 |
<a href="https://sky24h.github.io/websites/cvmj2023_controllable-artwork-synthesis/" target="_blank">
|
| 24 |
+
<b>Project Page</b>
|
| 25 |
+
<!-- <br> -->
|
| 26 |
</a>
|
| 27 |
+
|
|
|
|
|
|
|
| 28 |
</p>
|
| 29 |
<hr class="solid">
|
| 30 |
|