Athspi commited on
Commit
816f4da
·
verified ·
1 Parent(s): 93e0110

Delete templates/templates

Browse files
Files changed (1) hide show
  1. templates/templates/index.html +0 -379
templates/templates/index.html DELETED
@@ -1,379 +0,0 @@
1
- <!-- templates/index.html -->
2
- <!DOCTYPE html>
3
- <html lang="en">
4
- <head>
5
- <meta charset="UTF-8">
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
- <title>AI Video Dubbing</title>
8
- <link href="https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap" rel="stylesheet">
9
- <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" rel="stylesheet">
10
- <style>
11
- :root {
12
- --primary: #4361ee;
13
- --primary-light: #4895ef;
14
- --secondary: #3f37c9;
15
- --dark: #1a1a2e;
16
- --light: #f8f9fa;
17
- --gray: #6c757d;
18
- --success: #4cc9f0;
19
- --error: #f72585;
20
- --border-radius: 12px;
21
- --shadow: 0 10px 30px rgba(0,0,0,0.1);
22
- --transition: all 0.3s ease;
23
- }
24
-
25
- * {
26
- margin: 0;
27
- padding: 0;
28
- box-sizing: border-box;
29
- }
30
-
31
- body {
32
- font-family: 'Poppins', sans-serif;
33
- background-color: #f5f7ff;
34
- color: var(--dark);
35
- line-height: 1.6;
36
- padding: 20px;
37
- }
38
-
39
- .container {
40
- max-width: 800px;
41
- margin: 0 auto;
42
- background: white;
43
- border-radius: var(--border-radius);
44
- box-shadow: var(--shadow);
45
- overflow: hidden;
46
- }
47
-
48
- header {
49
- background: linear-gradient(135deg, var(--primary), var(--secondary));
50
- color: white;
51
- padding: 2rem;
52
- text-align: center;
53
- }
54
-
55
- h1 {
56
- font-size: 2.2rem;
57
- margin-bottom: 0.5rem;
58
- }
59
-
60
- .subtitle {
61
- font-weight: 300;
62
- opacity: 0.9;
63
- }
64
-
65
- .content {
66
- padding: 2rem;
67
- }
68
-
69
- .upload-area {
70
- border: 2px dashed var(--primary-light);
71
- border-radius: var(--border-radius);
72
- padding: 3rem 2rem;
73
- text-align: center;
74
- margin-bottom: 2rem;
75
- transition: var(--transition);
76
- cursor: pointer;
77
- position: relative;
78
- }
79
-
80
- .upload-area:hover {
81
- border-color: var(--primary);
82
- background: rgba(67, 97, 238, 0.05);
83
- }
84
-
85
- .upload-icon {
86
- font-size: 3rem;
87
- color: var(--primary-light);
88
- margin-bottom: 1rem;
89
- }
90
-
91
- .file-input {
92
- position: absolute;
93
- width: 100%;
94
- height: 100%;
95
- top: 0;
96
- left: 0;
97
- opacity: 0;
98
- cursor: pointer;
99
- }
100
-
101
- .file-info {
102
- margin-top: 1rem;
103
- font-size: 0.9rem;
104
- color: var(--gray);
105
- }
106
-
107
- .options {
108
- background: #f8f9fe;
109
- padding: 1.5rem;
110
- border-radius: var(--border-radius);
111
- margin-bottom: 2rem;
112
- }
113
-
114
- .option-group {
115
- margin-bottom: 1.5rem;
116
- }
117
-
118
- .option-title {
119
- font-weight: 600;
120
- margin-bottom: 0.8rem;
121
- color: var(--secondary);
122
- display: flex;
123
- align-items: center;
124
- gap: 0.5rem;
125
- }
126
-
127
- .option-title i {
128
- font-size: 1.1rem;
129
- }
130
-
131
- .radio-group, .checkbox-group {
132
- display: flex;
133
- flex-wrap: wrap;
134
- gap: 1rem;
135
- }
136
-
137
- .radio-option, .checkbox-option {
138
- display: flex;
139
- align-items: center;
140
- gap: 0.5rem;
141
- background: white;
142
- padding: 0.8rem 1.2rem;
143
- border-radius: 8px;
144
- box-shadow: 0 2px 5px rgba(0,0,0,0.05);
145
- transition: var(--transition);
146
- }
147
-
148
- .radio-option:hover, .checkbox-option:hover {
149
- box-shadow: 0 5px 15px rgba(0,0,0,0.1);
150
- }
151
-
152
- .radio-option input, .checkbox-option input {
153
- accent-color: var(--primary);
154
- }
155
-
156
- .btn {
157
- background: var(--primary);
158
- color: white;
159
- border: none;
160
- padding: 1rem;
161
- border-radius: var(--border-radius);
162
- font-size: 1.1rem;
163
- font-weight: 500;
164
- cursor: pointer;
165
- width: 100%;
166
- transition: var(--transition);
167
- display: flex;
168
- align-items: center;
169
- justify-content: center;
170
- gap: 0.8rem;
171
- }
172
-
173
- .btn:hover {
174
- background: var(--secondary);
175
- transform: translateY(-2px);
176
- box-shadow: 0 5px 15px rgba(63, 55, 201, 0.3);
177
- }
178
-
179
- .btn i {
180
- font-size: 1.2rem;
181
- }
182
-
183
- .alert {
184
- padding: 1rem;
185
- border-radius: var(--border-radius);
186
- margin-bottom: 1.5rem;
187
- font-weight: 500;
188
- display: flex;
189
- align-items: center;
190
- gap: 0.8rem;
191
- }
192
-
193
- .alert-success {
194
- background: rgba(76, 201, 240, 0.2);
195
- color: #0a9396;
196
- border: 1px solid rgba(76, 201, 240, 0.3);
197
- }
198
-
199
- .alert-error {
200
- background: rgba(247, 37, 133, 0.1);
201
- color: var(--error);
202
- border: 1px solid rgba(247, 37, 133, 0.2);
203
- }
204
-
205
- .loader {
206
- display: none;
207
- text-align: center;
208
- padding: 2rem;
209
- }
210
-
211
- .spinner {
212
- width: 50px;
213
- height: 50px;
214
- border: 5px solid rgba(67, 97, 238, 0.2);
215
- border-top: 5px solid var(--primary);
216
- border-radius: 50%;
217
- animation: spin 1s linear infinite;
218
- margin: 0 auto 1rem;
219
- }
220
-
221
- .loading-text {
222
- font-weight: 500;
223
- color: var(--dark);
224
- }
225
-
226
- @keyframes spin {
227
- 0% { transform: rotate(0deg); }
228
- 100% { transform: rotate(360deg); }
229
- }
230
-
231
- @media (max-width: 768px) {
232
- body {
233
- padding: 10px;
234
- }
235
-
236
- header {
237
- padding: 1.5rem;
238
- }
239
-
240
- h1 {
241
- font-size: 1.8rem;
242
- }
243
-
244
- .content {
245
- padding: 1.5rem;
246
- }
247
-
248
- .radio-group, .checkbox-group {
249
- flex-direction: column;
250
- gap: 0.8rem;
251
- }
252
- }
253
- </style>
254
- </head>
255
- <body>
256
- <div class="container">
257
- <header>
258
- <h1>AI Video Dubbing</h1>
259
- <p class="subtitle">Transform your videos with AI-powered Tamil dubbing</p>
260
- </header>
261
-
262
- <div class="content">
263
- {% with messages = get_flashed_messages(with_categories=true) %}
264
- {% if messages %}
265
- {% for category, message in messages %}
266
- <div class="alert alert-{{ category }}">
267
- <i class="fas {% if category == 'success' %}fa-check-circle{% else %}fa-exclamation-circle{% endif %}"></i>
268
- {{ message }}
269
- </div>
270
- {% endfor %}
271
- {% endif %}
272
- {% endwith %}
273
-
274
- <form id="dubbing-form" action="/process" method="POST" enctype="multipart/form-data">
275
- <div class="upload-area" id="upload-area">
276
- <div class="upload-icon">
277
- <i class="fas fa-cloud-upload-alt"></i>
278
- </div>
279
- <h3>Drag & Drop Video File</h3>
280
- <p>or click to browse (MP4, MOV, WEBM, AVI)</p>
281
- <div id="file-info" class="file-info">No file selected</div>
282
- <input type="file" id="video" name="video" class="file-input" accept="video/*">
283
- </div>
284
-
285
- <div class="options">
286
- <div class="option-group">
287
- <div class="option-title">
288
- <i class="fas fa-microphone"></i>
289
- Voice Style
290
- </div>
291
- <div class="radio-group">
292
- {% for voice, value in voices.items() %}
293
- <label class="radio-option">
294
- <input type="radio" name="voice" value="{{ value }}" {% if loop.first %}checked{% endif %}>
295
- {{ voice }}
296
- </label>
297
- {% endfor %}
298
- </div>
299
- </div>
300
-
301
- <div class="option-group">
302
- <div class="option-title">
303
- <i class="fas fa-adjust"></i>
304
- Tone Options
305
- </div>
306
- <div class="checkbox-group">
307
- <label class="checkbox-option">
308
- <input type="checkbox" name="tone">
309
- Cheerful Tone
310
- </label>
311
- </div>
312
- </div>
313
- </div>
314
-
315
- <button type="submit" class="btn">
316
- <i class="fas fa-magic"></i>
317
- Generate Dubbed Video
318
- </button>
319
- </form>
320
-
321
- <div class="loader" id="loader">
322
- <div class="spinner"></div>
323
- <p class="loading-text">Processing your video. Please wait...</p>
324
- </div>
325
- </div>
326
- </div>
327
-
328
- <script>
329
- const form = document.getElementById('dubbing-form');
330
- const loader = document.getElementById('loader');
331
- const uploadArea = document.getElementById('upload-area');
332
- const fileInput = document.getElementById('video');
333
- const fileInfo = document.getElementById('file-info');
334
-
335
- // Handle file selection
336
- fileInput.addEventListener('change', function() {
337
- if (this.files.length > 0) {
338
- fileInfo.textContent = this.files[0].name;
339
- uploadArea.style.borderColor = '#4361ee';
340
- uploadArea.style.backgroundColor = 'rgba(67, 97, 238, 0.05)';
341
- }
342
- });
343
-
344
- // Drag and drop functionality
345
- uploadArea.addEventListener('dragover', (e) => {
346
- e.preventDefault();
347
- uploadArea.style.borderColor = '#4361ee';
348
- uploadArea.style.backgroundColor = 'rgba(67, 97, 238, 0.1)';
349
- });
350
-
351
- uploadArea.addEventListener('dragleave', () => {
352
- uploadArea.style.borderColor = fileInput.files.length > 0 ? '#4361ee' : '#4895ef';
353
- uploadArea.style.backgroundColor = fileInput.files.length > 0 ? 'rgba(67, 97, 238, 0.05)' : 'transparent';
354
- });
355
-
356
- uploadArea.addEventListener('drop', (e) => {
357
- e.preventDefault();
358
- uploadArea.style.borderColor = '#4361ee';
359
- uploadArea.style.backgroundColor = 'rgba(67, 97, 238, 0.05)';
360
-
361
- if (e.dataTransfer.files.length) {
362
- fileInput.files = e.dataTransfer.files;
363
- fileInfo.textContent = e.dataTransfer.files[0].name;
364
- }
365
- });
366
-
367
- // Form submission
368
- form.addEventListener('submit', function(e) {
369
- if (!fileInput.files.length) {
370
- e.preventDefault();
371
- alert('Please select a video file first.');
372
- } else {
373
- form.style.display = 'none';
374
- loader.style.display = 'block';
375
- }
376
- });
377
- </script>
378
- </body>
379
- </html>