lotrlol commited on
Commit
e6a2c7d
·
1 Parent(s): 0281ed1

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +28 -16
index.html CHANGED
@@ -1,19 +1,31 @@
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
  <!DOCTYPE html>
2
  <html>
3
+ <head>
4
+ <title>Image Combiner</title>
5
+ </head>
6
+ <body>
7
+ <img id="image1" src="https://drive.google.com/uc?id=1qxfPHJXyTeS60Jqou6TG6g13AWLPweZZ" crossorigin="anonymous" style="display: none;">
8
+ <img id="image2" src="https://drive.google.com/uc?id=11WKe16T11m70GVmXj5O3u-Tk85MQHPf8" crossorigin="anonymous" style="display: none;">
9
+ <button onclick="combineImages()">Combine</button>
10
+ <canvas id="canvas" width="600" height="300"></canvas>
11
+
12
+ <script>
13
+ function combineImages() {
14
+ var image1 = document.getElementById('image1');
15
+ var image2 = document.getElementById('image2');
16
+
17
+ var canvas = document.getElementById('canvas');
18
+ var ctx = canvas.getContext('2d');
19
+
20
+ image1.onload = function () {
21
+ ctx.drawImage(image1, 0, 0, canvas.width / 2, canvas.height);
22
+ image2.onload = function () {
23
+ ctx.drawImage(image2, canvas.width / 2, 0, canvas.width / 2, canvas.height);
24
+ };
25
+ image2.src = "https://drive.google.com/uc?id=11WKe16T11m70GVmXj5O3u-Tk85MQHPf8";
26
+ };
27
+ image1.src = "https://drive.google.com/uc?id=1qxfPHJXyTeS60Jqou6TG6g13AWLPweZZ";
28
+ }
29
+ </script>
30
+ </body>
31
  </html>