Spaces:
Runtime error
Runtime error
Delete static/index.html
Browse files- static/index.html +0 -33
static/index.html
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
<!DOCTYPE html>
|
2 |
-
<html lang="en">
|
3 |
-
<head>
|
4 |
-
<meta charset="UTF-8">
|
5 |
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
-
<title>Sketch Image Result</title>
|
7 |
-
</head>
|
8 |
-
<body>
|
9 |
-
<h1>Sketch Image Result</h1>
|
10 |
-
<input type="file" id="imageUpload" accept="image/*">
|
11 |
-
<img id="resultImage" src="" alt="Result Image">
|
12 |
-
|
13 |
-
<script>
|
14 |
-
const imageUpload = document.getElementById('imageUpload');
|
15 |
-
const resultImage = document.getElementById('resultImage');
|
16 |
-
|
17 |
-
imageUpload.addEventListener('change', async function(event) {
|
18 |
-
const file = event.target.files[0];
|
19 |
-
const formData = new FormData();
|
20 |
-
formData.append('file', file);
|
21 |
-
|
22 |
-
const response = await fetch('/upload/', {
|
23 |
-
method: 'POST',
|
24 |
-
body: formData
|
25 |
-
});
|
26 |
-
|
27 |
-
const responseData = await response.json();
|
28 |
-
const resultImageUrl = responseData.sketch_image;
|
29 |
-
resultImage.src = resultImageUrl;
|
30 |
-
});
|
31 |
-
</script>
|
32 |
-
</body>
|
33 |
-
</html>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|