Spaces:
Build error
Build error
File size: 1,717 Bytes
e4148a8 4128a8b bb6266b 4128a8b e4148a8 |
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 |
<html>
<head>
<title>Dubbing Video</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<body>
<h1>Dubbing Video</h1>
<form action="{{ url_for('generate_dubbed_video') }}" method="post" enctype="multipart/form-data">
<label for="video_file">Upload Video:</label>
<input type="file" name="video_file" id="video_file">
<br><br>
<label for="video_url">Import from URL:</label>
<input type="text" name="video_url" id="video_url">
<br><br>
<label for="language">Select Language:</label>
<select name="language" id="language">
<option value="hi">Hindi</option>
</select>
<br><br>
<input type="submit" value="Dub Video">
</form>
{% if result %}
<br><br>
<a href="{{ result }}" download>Download Dubbed Video</a>
{% endif %}
<br><br>
{% if progress %}
<div id="progress-bar" style="width: 500px; height: 20px; border: 1px solid #ccc;">
<div id="progress" style="height: 100%; width: {{ progress }}%; background-color: #4CAF50;"></div>
</div>
{% endif %}
<script>
function updateProgress(progress) {
$("#progress").css("width", progress + "%");
}
$(document).ready(function() {
var source = new EventSource("/progress");
source.onmessage = function(event) {
updateProgress(event.data);
};
});
</script>
</body>
</html> |