Spaces:
Running
Running
Upload index.html with huggingface_hub
Browse files- 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 |
-
<
|
| 7 |
-
|
| 8 |
-
<
|
| 9 |
-
<
|
| 10 |
</head>
|
| 11 |
-
|
| 12 |
<body>
|
| 13 |
-
<
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
</
|
| 19 |
-
</
|
| 20 |
-
|
| 21 |
-
<
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
</
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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>
|