imseldrith commited on
Commit
4128a8b
·
1 Parent(s): c3eb0fd

Update templates/index.html

Browse files
Files changed (1) hide show
  1. templates/index.html +42 -44
templates/index.html CHANGED
@@ -1,46 +1,44 @@
1
- <!DOCTYPE html>
2
  <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <title>Video Dubbing Application</title>
6
- </head>
7
- <body>
8
- <h1>Video Dubbing Application</h1>
9
- <form action="/" method="post" enctype="multipart/form-data">
10
- <div>
11
- <label for="video_file">Upload Video:</label>
12
- <input type="file" id="video_file" name="video_file">
13
- </div>
14
- <div>
15
- <label for="video_url">Import Video URL:</label>
16
- <input type="url" id="video_url" name="video_url">
17
- </div>
18
- <div>
19
- <label for="language">Language:</label>
20
- <select id="language" name="language">
21
- <option value="hi">Hindi</option>
22
- </select>
23
- </div>
24
- <div>
25
- <input type="submit" value="Dub Video">
26
- </div>
27
- </form>
28
- {% if video_url %}
29
- <div>
30
- <p>Dubbing Progress:</p>
31
- <div class="progress">
32
- <div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100" style="width: 0%;"></div>
33
- </div>
34
- </div>
35
- {% endif %}
36
- {% if result %}
37
- <div>
38
- <p>Dubbed Video:</p>
39
- <video controls>
40
- <source src="{{ result }}" type="video/mp4">
41
- Your browser does not support the video tag.
42
- </video>
43
- </div>
44
- {% endif %}
45
- </body>
46
  </html>
 
 
1
  <html>
2
+ <head>
3
+ <title>Dubbing Video</title>
4
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
5
+ </head>
6
+ <body>
7
+ <h1>Dubbing Video</h1>
8
+ <form action="{{ url_for('dub_video') }}" method="post" enctype="multipart/form-data">
9
+ <label for="video_file">Upload Video:</label>
10
+ <input type="file" name="video_file" id="video_file">
11
+ <br><br>
12
+ <label for="video_url">Import from URL:</label>
13
+ <input type="text" name="video_url" id="video_url">
14
+ <br><br>
15
+ <label for="language">Select Language:</label>
16
+ <select name="language" id="language">
17
+ <option value="hi">Hindi</option>
18
+ </select>
19
+ <br><br>
20
+ <input type="submit" value="Dub Video">
21
+ </form>
22
+ {% if result %}
23
+ <br><br>
24
+ <a href="{{ result }}" download>Download Dubbed Video</a>
25
+ {% endif %}
26
+ <br><br>
27
+ {% if progress %}
28
+ <div id="progress-bar" style="width: 500px; height: 20px; border: 1px solid #ccc;">
29
+ <div id="progress" style="height: 100%; width: {{ progress }}%; background-color: #4CAF50;"></div>
30
+ </div>
31
+ {% endif %}
32
+ <script>
33
+ function updateProgress(progress) {
34
+ $("#progress").css("width", progress + "%");
35
+ }
36
+ $(document).ready(function() {
37
+ var source = new EventSource("/progress");
38
+ source.onmessage = function(event) {
39
+ updateProgress(event.data);
40
+ };
41
+ });
42
+ </script>
43
+ </body>
 
44
  </html>