Create templates/index.html
Browse files- templates/index.html +65 -0
templates/index.html
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<!DOCTYPE html>
|
2 |
+
<html lang="en">
|
3 |
+
<head>
|
4 |
+
<meta charset="UTF-8">
|
5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
6 |
+
<title>AI Video Dubbing</title>
|
7 |
+
<style>
|
8 |
+
body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; margin: 0; background-color: #f0f2f5; display: flex; justify-content: center; align-items: center; min-height: 100vh; }
|
9 |
+
.container { background-color: #fff; padding: 2rem; border-radius: 12px; box-shadow: 0 4px 12px rgba(0,0,0,0.1); width: 100%; max-width: 600px; }
|
10 |
+
h1 { text-align: center; color: #1c1e21; }
|
11 |
+
form { display: flex; flex-direction: column; gap: 1.5rem; }
|
12 |
+
.form-group { display: flex; flex-direction: column; }
|
13 |
+
label { margin-bottom: 0.5rem; font-weight: 600; color: #4b4f56; }
|
14 |
+
input[type="file"] { border: 1px solid #dddfe2; padding: 0.75rem; border-radius: 6px; }
|
15 |
+
.radio-group label { display: inline-block; margin-right: 1rem; }
|
16 |
+
input[type="submit"] { background-color: #1877f2; color: white; border: none; padding: 0.75rem 1.5rem; border-radius: 6px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: background-color 0.2s; }
|
17 |
+
input[type="submit"]:hover { background-color: #166fe5; }
|
18 |
+
.result-section { margin-top: 2rem; border-top: 1px solid #dddfe2; padding-top: 2rem; }
|
19 |
+
h2 { color: #1c1e21; }
|
20 |
+
video { width: 100%; border-radius: 8px; }
|
21 |
+
.script-box { background-color: #f0f2f5; border: 1px solid #dddfe2; padding: 1rem; border-radius: 6px; white-space: pre-wrap; font-family: "Courier New", Courier, monospace; }
|
22 |
+
</style>
|
23 |
+
</head>
|
24 |
+
<body>
|
25 |
+
<div class="container">
|
26 |
+
<h1>AI Single-Speaker Video Dubbing</h1>
|
27 |
+
<form action="/process" method="POST" enctype="multipart/form-data">
|
28 |
+
<div class="form-group">
|
29 |
+
<label for="video">Upload Video File:</label>
|
30 |
+
<input type="file" id="video" name="video" accept="video/*" required>
|
31 |
+
</div>
|
32 |
+
|
33 |
+
<div class="form-group radio-group">
|
34 |
+
<label>Select Narrator Voice:</label>
|
35 |
+
<div>
|
36 |
+
<label><input type="radio" name="voice_choice" value="Male (Charon)" checked> Male (Charon)</label>
|
37 |
+
<label><input type="radio" name="voice_choice" value="Female (Zephyr)"> Female (Zephyr)</label>
|
38 |
+
</div>
|
39 |
+
</div>
|
40 |
+
|
41 |
+
<div class="form-group">
|
42 |
+
<label><input type="checkbox" name="cheerful"> Enable Cheerful Tone</label>
|
43 |
+
</div>
|
44 |
+
|
45 |
+
<input type="submit" value="Generate Dubbed Video">
|
46 |
+
</form>
|
47 |
+
|
48 |
+
{% if result_video %}
|
49 |
+
<div class="result-section">
|
50 |
+
<h2>Dubbed Video</h2>
|
51 |
+
<video controls>
|
52 |
+
<source src="{{ result_video }}" type="video/mp4">
|
53 |
+
Your browser does not support the video tag.
|
54 |
+
</video>
|
55 |
+
|
56 |
+
<h2>Generated Script</h2>
|
57 |
+
<div class="script-box">
|
58 |
+
{{ script }}
|
59 |
+
</div>
|
60 |
+
</div>
|
61 |
+
{% endif %}
|
62 |
+
|
63 |
+
</div>
|
64 |
+
</body>
|
65 |
+
</html>
|