Upload index.html with huggingface_hub
Browse files- index.html +94 -22
index.html
CHANGED
@@ -1,29 +1,101 @@
|
|
1 |
<!DOCTYPE html>
|
2 |
<html lang="en">
|
3 |
-
|
4 |
<head>
|
5 |
-
<meta charset="UTF-8"
|
6 |
-
<
|
7 |
-
|
8 |
-
<
|
9 |
-
<title>Transformers.js - Object Detection</title>
|
10 |
</head>
|
11 |
-
|
12 |
<body>
|
13 |
-
<
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
27 |
</body>
|
28 |
-
|
29 |
</html>
|
|
|
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>Video Caption AI</title>
|
7 |
+
<link rel="stylesheet" href="style.css">
|
|
|
8 |
</head>
|
|
|
9 |
<body>
|
10 |
+
<div class="container">
|
11 |
+
<div class="video-container">
|
12 |
+
<video id="videoPlayer" controls></video>
|
13 |
+
|
14 |
+
<div class="overlay-ui">
|
15 |
+
<div class="header">
|
16 |
+
<h1>Video Caption AI</h1>
|
17 |
+
<p class="subtitle">Powered by FastVLM</p>
|
18 |
+
</div>
|
19 |
+
|
20 |
+
<div class="upload-area" id="uploadArea">
|
21 |
+
<svg class="upload-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
22 |
+
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
|
23 |
+
<polyline points="17 8 12 3 7 8"></polyline>
|
24 |
+
<line x1="12" y1="3" x2="12" y2="15"></line>
|
25 |
+
</svg>
|
26 |
+
<h2>Upload Video</h2>
|
27 |
+
<p>Drag and drop or click to browse</p>
|
28 |
+
<input type="file" id="videoInput" accept="video/*" hidden>
|
29 |
+
</div>
|
30 |
+
|
31 |
+
<div class="controls" id="controls">
|
32 |
+
<button id="processBtn" class="primary-btn">
|
33 |
+
<span class="btn-text">Generate Captions</span>
|
34 |
+
<div class="spinner"></div>
|
35 |
+
</button>
|
36 |
+
|
37 |
+
<div class="settings">
|
38 |
+
<label class="setting-item">
|
39 |
+
<span>Frames to analyze</span>
|
40 |
+
<select id="frameCount">
|
41 |
+
<option value="4">4 frames</option>
|
42 |
+
<option value="8" selected>8 frames</option>
|
43 |
+
<option value="12">12 frames</option>
|
44 |
+
<option value="16">16 frames</option>
|
45 |
+
</select>
|
46 |
+
</label>
|
47 |
+
|
48 |
+
<label class="setting-item">
|
49 |
+
<span>Device</span>
|
50 |
+
<select id="deviceSelect">
|
51 |
+
<option value="cpu">CPU</option>
|
52 |
+
<option value="webgpu">GPU (WebGPU)</option>
|
53 |
+
</select>
|
54 |
+
</label>
|
55 |
+
</div>
|
56 |
+
</div>
|
57 |
+
|
58 |
+
<div class="results" id="results">
|
59 |
+
<div class="results-header">
|
60 |
+
<h3>Video Captions</h3>
|
61 |
+
<button id="copyBtn" class="icon-btn">
|
62 |
+
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
|
63 |
+
<rect x="9" y="9" width="13" height="13" rx="2" ry="2"></rect>
|
64 |
+
<path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1"></path>
|
65 |
+
</svg>
|
66 |
+
</button>
|
67 |
+
</div>
|
68 |
+
|
69 |
+
<div class="frame-captions" id="frameCaptions"></div>
|
70 |
+
|
71 |
+
<div class="final-caption" id="finalCaption">
|
72 |
+
<h4>Video Summary</h4>
|
73 |
+
<p id="summaryText"></p>
|
74 |
+
</div>
|
75 |
+
</div>
|
76 |
+
|
77 |
+
<div class="progress-overlay" id="progressOverlay">
|
78 |
+
<div class="progress-content">
|
79 |
+
<div class="progress-ring">
|
80 |
+
<svg viewBox="0 0 100 100">
|
81 |
+
<circle cx="50" cy="50" r="45" fill="none" stroke="#e5e5e7" stroke-width="8"/>
|
82 |
+
<circle id="progressCircle" cx="50" cy="50" r="45" fill="none" stroke="url(#gradient)" stroke-width="8" stroke-linecap="round" transform="rotate(-90 50 50)"/>
|
83 |
+
<defs>
|
84 |
+
<linearGradient id="gradient" x1="0%" y1="0%" x2="100%" y2="100%">
|
85 |
+
<stop offset="0%" style="stop-color:#007AFF"/>
|
86 |
+
<stop offset="100%" style="stop-color:#5856D6"/>
|
87 |
+
</linearGradient>
|
88 |
+
</defs>
|
89 |
+
</svg>
|
90 |
+
<span class="progress-text" id="progressText">0%</span>
|
91 |
+
</div>
|
92 |
+
<p id="progressStatus">Initializing...</p>
|
93 |
+
</div>
|
94 |
+
</div>
|
95 |
+
</div>
|
96 |
+
</div>
|
97 |
+
</div>
|
98 |
+
|
99 |
+
<script type="module" src="index.js"></script>
|
100 |
</body>
|
|
|
101 |
</html>
|