mugdha99 commited on
Commit
5ed5b27
·
verified ·
1 Parent(s): be7c670

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +18 -7
index.html CHANGED
@@ -7,15 +7,16 @@
7
  <title>Transformers.js - Background Removal</title>
8
  <script type="module" crossorigin src="/assets/index-E_M5nW8h.js"></script>
9
  <link rel="stylesheet" crossorigin href="/assets/index-SojaDS6z.css">
 
 
 
 
 
 
10
  </head>
11
 
12
  <body>
13
  <h1>Photo Background Removal Tool By WebTech By Rohit.</h1>
14
- <!-- <h1>Background Removal w/ <a href="http://github.com/xenova/transformers.js" target="_blank">🤗 Transformers.js</a>
15
- </h1> -->
16
- <!-- <h4>Runs locally in your browser, powered by the <a href="https://huggingface.co/briaai/RMBG-1.4" target="_blank">RMBG V1.4 model</a> from <a
17
- href="https://bria.ai/" target="_blank">BRIA AI</a>
18
- </h4> -->
19
  <div id="container">
20
  <label id="upload-button" for="upload">
21
  <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
@@ -29,8 +30,18 @@
29
  </div>
30
  <label id="status"></label>
31
  <input id="upload" type="file" accept="image/*" />
32
- <button onclick=refresh()>Remove Another Photo Background</button>
 
 
 
 
 
33
 
 
 
 
 
 
34
  </body>
35
 
36
- </html>
 
7
  <title>Transformers.js - Background Removal</title>
8
  <script type="module" crossorigin src="/assets/index-E_M5nW8h.js"></script>
9
  <link rel="stylesheet" crossorigin href="/assets/index-SojaDS6z.css">
10
+
11
+ <style>
12
+ #remove-background-button {
13
+ display: none; /* Initially hide the button */
14
+ }
15
+ </style>
16
  </head>
17
 
18
  <body>
19
  <h1>Photo Background Removal Tool By WebTech By Rohit.</h1>
 
 
 
 
 
20
  <div id="container">
21
  <label id="upload-button" for="upload">
22
  <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
 
30
  </div>
31
  <label id="status"></label>
32
  <input id="upload" type="file" accept="image/*" />
33
+ <button id="remove-background-button" onclick="refresh()">Remove Another Photo Background</button>
34
+
35
+ <script>
36
+ function refresh() {
37
+ window.location.reload(); // Refresh the page
38
+ }
39
 
40
+ document.getElementById('upload').addEventListener('change', function () {
41
+ // Show the button when an image is uploaded
42
+ document.getElementById('remove-background-button').style.display = 'block';
43
+ });
44
+ </script>
45
  </body>
46
 
47
+ </html>