akhaliq HF Staff commited on
Commit
ec424ff
·
verified ·
1 Parent(s): 3215ade

Upload index.html with huggingface_hub

Browse files
Files changed (1) hide show
  1. index.html +103 -22
index.html CHANGED
@@ -1,29 +1,110 @@
1
  <!DOCTYPE html>
2
  <html lang="en">
3
-
4
  <head>
5
- <meta charset="UTF-8" />
6
- <link rel="stylesheet" href="style.css" />
7
-
8
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
9
- <title>Transformers.js - Object Detection</title>
10
  </head>
11
-
12
  <body>
13
- <h1>Object Detection w/ 🤗 Transformers.js</h1>
14
- <label id="container" for="upload">
15
- <svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
16
- <path fill="#000"
17
- 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">
18
- </path>
19
- </svg>
20
- Click to upload image
21
- <label id="example">(or try example)</label>
22
- </label>
23
- <label id="status">Loading model...</label>
24
- <input id="upload" type="file" accept="image/*" />
25
-
26
- <script src="index.js" type="module"></script>
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 Transcription AI</title>
7
+ <link rel="stylesheet" href="style.css">
8
+ <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap" rel="stylesheet">
9
  </head>
 
10
  <body>
11
+ <div class="container">
12
+ <header>
13
+ <div class="header-content">
14
+ <h1>🎥 Video Transcription AI</h1>
15
+ <p>Analyze and transcribe video content using AI</p>
16
+ </div>
17
+ </header>
18
+
19
+ <main>
20
+ <div class="upload-section">
21
+ <div class="upload-card">
22
+ <svg class="upload-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
23
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M7 16a4 4 0 01-.88-7.903A5 5 0 1115.9 6L16 6a5 5 0 011 9.9M15 13l-3-3m0 0l-3 3m3-3v12" />
24
+ </svg>
25
+ <h2>Upload Video</h2>
26
+ <p>Select a video file to analyze</p>
27
+ <input type="file" id="videoInput" accept="video/*" hidden>
28
+ <button class="btn-primary" onclick="document.getElementById('videoInput').click()">
29
+ Choose Video
30
+ </button>
31
+ <div id="videoInfo" class="video-info"></div>
32
+ </div>
33
+
34
+ <div class="settings-card">
35
+ <h3>Settings</h3>
36
+ <div class="setting-item">
37
+ <label for="frameCount">Number of frames to analyze:</label>
38
+ <input type="number" id="frameCount" min="1" max="16" value="4">
39
+ </div>
40
+ <div class="setting-item">
41
+ <label for="deviceSelect">Processing device:</label>
42
+ <select id="deviceSelect">
43
+ <option value="wasm">CPU (WASM)</option>
44
+ <option value="webgpu">GPU (WebGPU)</option>
45
+ </select>
46
+ </div>
47
+ </div>
48
+ </div>
49
+
50
+ <div id="videoPreview" class="video-preview hidden">
51
+ <h3>Video Preview</h3>
52
+ <video id="videoElement" controls></video>
53
+ </div>
54
+
55
+ <button id="analyzeBtn" class="btn-analyze hidden" disabled>
56
+ <span class="btn-text">Analyze Video</span>
57
+ <div class="spinner hidden"></div>
58
+ </button>
59
 
60
+ <div id="progressSection" class="progress-section hidden">
61
+ <div class="progress-header">
62
+ <h3>Processing Video</h3>
63
+ <span id="progressText">Initializing...</span>
64
+ </div>
65
+ <div class="progress-bar">
66
+ <div id="progressFill" class="progress-fill"></div>
67
+ </div>
68
+ <div id="currentStatus" class="current-status"></div>
69
+ </div>
70
+
71
+ <div id="resultsSection" class="results-section hidden">
72
+ <h2>Analysis Results</h2>
73
+
74
+ <div class="frames-grid" id="framesGrid"></div>
75
+
76
+ <div class="summary-card hidden" id="summaryCard">
77
+ <h3>📝 Video Summary</h3>
78
+ <div id="summaryContent" class="summary-content"></div>
79
+ </div>
80
+
81
+ <div class="actions">
82
+ <button class="btn-secondary" onclick="downloadResults()">
83
+ Download Results
84
+ </button>
85
+ <button class="btn-secondary" onclick="resetApp()">
86
+ Analyze Another Video
87
+ </button>
88
+ </div>
89
+ </div>
90
+
91
+ <div id="errorSection" class="error-section hidden">
92
+ <div class="error-card">
93
+ <svg class="error-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor">
94
+ <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4m0 4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z" />
95
+ </svg>
96
+ <h3>Error Occurred</h3>
97
+ <p id="errorMessage"></p>
98
+ <button class="btn-primary" onclick="resetApp()">Try Again</button>
99
+ </div>
100
+ </div>
101
+ </main>
102
+
103
+ <footer>
104
+ <p>Powered by Transformers.js and FastVLM • WebGPU Support: <span id="webgpuStatus"></span></p>
105
+ </footer>
106
+ </div>
107
+
108
+ <script type="module" src="index.js"></script>
109
+ </body>
110
  </html>