Xenova HF staff commited on
Commit
c396276
1 Parent(s): 34e152b

Upload 3 files

Browse files
assets/index-BBEfCM5T.css ADDED
@@ -0,0 +1 @@
 
 
1
+ *{box-sizing:border-box;padding:0;margin:0;font-family:sans-serif}html,body{height:100%}body{padding:16px 32px}body,#container{display:flex;flex-direction:column;justify-content:center;align-items:center}#controls{display:flex;padding:1rem;gap:1rem}#controls>div{text-align:center}h1,h3{text-align:center}h3{margin-top:.5rem}#container{display:flex;flex-direction:row;position:relative;max-width:100%;max-height:100%;border:2px dashed #D1D5DB;border-radius:.75rem;overflow:hidden;margin-top:1rem;background-size:100% 100%;background-position:center;background-repeat:no-repeat}#video,#output-canvas{width:504px;height:504px}canvas{width:100%;height:100%}#status{min-height:16px;margin:8px 0}
assets/index-HiTDJoem.js ADDED
The diff for this file is too large to render. See raw diff
 
index.html CHANGED
@@ -1,19 +1,43 @@
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 lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8" />
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
+ <title>Transformers.js | Real-time depth estimation</title>
8
+ <script type="module" crossorigin src="/assets/index-HiTDJoem.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-BBEfCM5T.css">
10
+ </head>
11
+
12
+ <body>
13
+ <h1>
14
+ Real-time depth estimation w/
15
+ <a href="https://huggingface.co/onnx-community/depth-anything-v2-small" target="_blank">Depth Anything V2</a>
16
+ </h1>
17
+ <h3>
18
+ Runs locally in your browser, powered by
19
+ <a href="http://github.com/xenova/transformers.js" target="_blank">🤗 Transformers.js</a>
20
+ </h3>
21
+ <div id="container">
22
+ <video id="video" autoplay muted playsinline></video>
23
+ <canvas id="output-canvas"></canvas>
24
+ </div>
25
+ <div id="controls">
26
+ <div title="Read frames from your webcam and process them at a lower size (lower = faster)">
27
+ <label>Stream scale</label>
28
+ (<label id="scale-value">0.4</label>)
29
+ <br>
30
+ <input id="scale" type="range" min="0.1" max="1" step="0.1" value="0.4" disabled>
31
+ </div>
32
+ <div title="The width of the image (lower = faster)">
33
+ <label>Image size</label>
34
+ (<label id="size-value">504</label>px)
35
+ <br>
36
+ <input id="size" type="range" min="140" max="840" step="14" value="504" disabled>
37
+ </div>
38
+ </div>
39
+ <label id="status">Loading model...</label>
40
+
41
+ </body>
42
+
43
+ </html>