Spaces:
Runtime error
Runtime error
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Video Dubbing App</title> | |
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous"> | |
<style> | |
.container { | |
margin-top: 50px; | |
} | |
</style> | |
</head> | |
<body> | |
<div class="container"> | |
<h1 class="text-center">Video Dubbing App</h1> | |
<form action="{{ url_for('dub') }}" method="post"> | |
<div class="form-group"> | |
<label for="source">Select Video Source:</label> | |
<select class="form-control" id="source" name="source" required> | |
<option value="">--- Select ---</option> | |
<option value="url">URL</option> | |
<option value="file">File</option> | |
</select> | |
</div> | |
<div class="form-group" id="url-group" style="display: none;"> | |
<label for="url">Enter Video URL:</label> | |
<input type="text" class="form-control" id="url" name="url" placeholder="Enter Video URL"> | |
</div> | |
<div class="form-group" id="file-group" style="display: none;"> | |
<label for="file">Upload Video File:</label> | |
<input type="file" class="form-control-file" id="file" name="file"> | |
</div> | |
<button type="submit" class="btn btn-primary">Dub Video</button> | |
</form> | |
</div> | |
<script> | |
document.getElementById("source").addEventListener("change", function() { | |
var source = this.value; | |
if (source === "url") { | |
document.getElementById("url-group").style.display = "block"; | |
document.getElementById("file-group").style.display = "none"; | |
} else if (source === "file") { | |
document.getElementById("url-group").style.display = "none"; | |
document.getElementById("file-group").style.display = "block"; | |
} else { | |
document.getElementById("url-group").style.display = "none"; | |
document.getElementById("file-group").style.display = "none"; | |
} | |
}); | |
</script> | |
</body> | |
</html> |