File size: 2,737 Bytes
0cb486a
 
 
 
 
 
 
 
 
 
fc6dd1b
 
0cb486a
 
 
fc4371c
0cb486a
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fc6dd1b
 
 
 
 
 
0cb486a
 
 
 
 
fc4371c
0cb486a
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
<!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; }
        .radio-container { display: flex; gap: 2rem; margin-bottom: 1rem;}
        .radio-option { display: flex; flex-direction: column; align-items: flex-start;}
    </style>
</head>
<body>
    <form id="video-form" action="/transcribe/" method="post" enctype="multipart/form-data" onsubmit="submitButton.disabled = true; return true;">
        <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">

        <label for="device_type">Device Type</label>
        <select name="device_type">
          <option value="desktop">Desktop</option>
          <option value="mobile">Mobile</option>
        </select>
       
        <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" name="submitButton" 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>