Spaces:
Running
Running
Upload index.html
Browse files- index.html +49 -0
index.html
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>Transformers.js - Background Removal</title>
|
| 7 |
+
<script type="module" crossorigin src="./assets/index-BqalD_uN.js"></script>
|
| 8 |
+
<link rel="stylesheet" crossorigin href="./assets/index-PenTddJ7.css">
|
| 9 |
+
</head>
|
| 10 |
+
|
| 11 |
+
<body>
|
| 12 |
+
<h1>
|
| 13 |
+
Background Removal on <label id="device"></label>
|
| 14 |
+
</h1>
|
| 15 |
+
<h4>
|
| 16 |
+
Runs locally in your browser, powered by the
|
| 17 |
+
<a href="https://huggingface.co/briaai/RMBG-1.4" target="_blank"
|
| 18 |
+
>RMBG v1.4</a
|
| 19 |
+
>
|
| 20 |
+
using <a href="https://github.com/huggingface/transformers.js" target="_blank"
|
| 21 |
+
>Transformers.js</a
|
| 22 |
+
>
|
| 23 |
+
</h4>
|
| 24 |
+
<div id="container">
|
| 25 |
+
<label id="upload-button" for="upload">
|
| 26 |
+
<svg
|
| 27 |
+
width="25"
|
| 28 |
+
height="25"
|
| 29 |
+
viewBox="0 0 25 25"
|
| 30 |
+
fill="none"
|
| 31 |
+
xmlns="http://www.w3.org/2000/svg"
|
| 32 |
+
>
|
| 33 |
+
<path
|
| 34 |
+
fill="#000"
|
| 35 |
+
d="M3.5 24.3a3 3 0 0 1-1.9-.8c-.5-.5-.8-1.2-.8-1.9V2.9c0-.7.3-1.3.8-1.9.6-.5 1.2-.7 2-.7h18.6c.7 0 1.3.2 1.9.7.5.6.7 1.2.7 2v18.6c0 .7-.2 1.4-.7 1.9a3 3 0 0 1-2 .8H3.6Zm0-2.7h18.7V2.9H3.5v18.7Zm2.7-2.7h13.3c.3 0 .5 0 .6-.3v-.7l-3.7-5a.6.6 0 0 0-.6-.2c-.2 0-.4 0-.5.3l-3.5 4.6-2.4-3.3a.6.6 0 0 0-.6-.3c-.2 0-.4.1-.5.3l-2.7 3.6c-.1.2-.2.4 0 .7.1.2.3.3.6.3Z"
|
| 36 |
+
></path>
|
| 37 |
+
</svg>
|
| 38 |
+
Click to upload image
|
| 39 |
+
<label id="example">(or try example)</label>
|
| 40 |
+
</label>
|
| 41 |
+
</div>
|
| 42 |
+
<div class="device-links">
|
| 43 |
+
<a href="?device=webgpu">WebGPU</a> 路 <a href="?device=webnn-gpu">WebNN GPU</a> 路 <a href="?device=webnn-npu">WebNN NPU</a>
|
| 44 |
+
</div>
|
| 45 |
+
<label id="status"></label>
|
| 46 |
+
<input id="upload" type="file" accept="image/*" />
|
| 47 |
+
|
| 48 |
+
</body>
|
| 49 |
+
</html>
|