multilang-asr-captioner / static /transcribe_video.html
marquesafonso's picture
separate transcriber and process_video logic; add transcription preview form; python 3.12 (tempdir del)
0cb486a
raw
history blame
2.29 kB
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css" integrity="sha512-Fo3rlrZj/k7ujTnHg4CGR2D7kSs0v4LLanw2qksYuRlEzO+tcaEPQogQ0KaoGN26/zrn20ImR1DfuLWnOo7aBA==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<title>Transcribe Video</title>
<style>
body { font-family: Arial; background: #f0f0f0; padding: 2rem; }
form { background: white; padding: 2rem; border-radius: 10px; max-width: 600px; margin: auto; }
label, select, input { display: block; width: 100%; margin-bottom: 1rem; }
input[type="submit"] { background: #4CAF50; color: white; padding: 0.8rem; border: none; cursor: pointer; }
</style>
</head>
<body>
<form id="video-form" action="/transcribe/" method="post" enctype="multipart/form-data">
<h2>Step 1: Upload & Transcribe</h2>
<label for="video_file">Video File</label>
<input type="file" name="video_file" id="video_file" required>
<label for="task">Task</label>
<select name="task" id="task">
<option value="transcribe">Transcribe</option>
<option value="translate">Translate</option>
</select>
<label for="model_version">Model Version</label>
<select name="model_version" id="model_version">
<option value="deepdml/faster-whisper-large-v3-turbo-ct2">faster-whisper-large-v3-turbo</option>
<option value="turbo">turbo</option>
<option value="large-v3">large-v3</option>
</select>
<label for="max_words_per_line">Max words per line</label>
<input type="number" name="max_words_per_line" id="max_words_per_line" value="6">
<div id="loading" style="display:none; text-align: center; margin-top: 10px; margin-bottom: 10px; font-weight: bold;">
<i class="fas fa-spinner fa-spin"></i> Processing, please wait...
</div>
<input type="submit" value="Transcribe">
</form>
<script>
// Show loading spinner on submit
document.getElementById('video-form').addEventListener('submit', function () {
document.getElementById('loading').style.display = 'block';
});
</script>
</body>
</html>