Translate / templates /index.html
Athspi's picture
Create templates/index.html
b90d0e2 verified
raw
history blame
3.14 kB
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Video Dubbing</title>
<style>
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; }
.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; }
h1 { text-align: center; color: #1c1e21; }
form { display: flex; flex-direction: column; gap: 1.5rem; }
.form-group { display: flex; flex-direction: column; }
label { margin-bottom: 0.5rem; font-weight: 600; color: #4b4f56; }
input[type="file"] { border: 1px solid #dddfe2; padding: 0.75rem; border-radius: 6px; }
.radio-group label { display: inline-block; margin-right: 1rem; }
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; }
input[type="submit"]:hover { background-color: #166fe5; }
.result-section { margin-top: 2rem; border-top: 1px solid #dddfe2; padding-top: 2rem; }
h2 { color: #1c1e21; }
video { width: 100%; border-radius: 8px; }
.script-box { background-color: #f0f2f5; border: 1px solid #dddfe2; padding: 1rem; border-radius: 6px; white-space: pre-wrap; font-family: "Courier New", Courier, monospace; }
</style>
</head>
<body>
<div class="container">
<h1>AI Single-Speaker Video Dubbing</h1>
<form action="/process" method="POST" enctype="multipart/form-data">
<div class="form-group">
<label for="video">Upload Video File:</label>
<input type="file" id="video" name="video" accept="video/*" required>
</div>
<div class="form-group radio-group">
<label>Select Narrator Voice:</label>
<div>
<label><input type="radio" name="voice_choice" value="Male (Charon)" checked> Male (Charon)</label>
<label><input type="radio" name="voice_choice" value="Female (Zephyr)"> Female (Zephyr)</label>
</div>
</div>
<div class="form-group">
<label><input type="checkbox" name="cheerful"> Enable Cheerful Tone</label>
</div>
<input type="submit" value="Generate Dubbed Video">
</form>
{% if result_video %}
<div class="result-section">
<h2>Dubbed Video</h2>
<video controls>
<source src="{{ result_video }}" type="video/mp4">
Your browser does not support the video tag.
</video>
<h2>Generated Script</h2>
<div class="script-box">
{{ script }}
</div>
</div>
{% endif %}
</div>
</body>
</html>