Ashrafb commited on
Commit
4807797
1 Parent(s): 5663e02

Update static/index.html

Browse files
Files changed (1) hide show
  1. static/index.html +7 -2
static/index.html CHANGED
@@ -4,13 +4,13 @@
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image to Sketch</title>
7
- <style>
8
  /* Style to make the image smaller */
9
  #result img {
10
  max-width: 100%;
11
  height: auto;
12
  }
13
- </style>
14
  </head>
15
  <body>
16
  <h1>Image to Sketch</h1>
@@ -34,6 +34,11 @@
34
  const data = await response.json();
35
  const sketchImage = document.createElement('img');
36
  sketchImage.src = data.sketch_image_base64;
 
 
 
 
 
37
  document.getElementById('result').appendChild(sketchImage);
38
  }
39
 
 
4
  <meta charset="UTF-8">
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
  <title>Image to Sketch</title>
7
+ <style>
8
  /* Style to make the image smaller */
9
  #result img {
10
  max-width: 100%;
11
  height: auto;
12
  }
13
+ </style>
14
  </head>
15
  <body>
16
  <h1>Image to Sketch</h1>
 
34
  const data = await response.json();
35
  const sketchImage = document.createElement('img');
36
  sketchImage.src = data.sketch_image_base64;
37
+
38
+ // Clear previous result
39
+ document.getElementById('result').innerHTML = '';
40
+
41
+ // Append new image
42
  document.getElementById('result').appendChild(sketchImage);
43
  }
44