WebashalarForML commited on
Commit
345a57c
·
verified ·
1 Parent(s): a9c1e99

Update templates/result.html

Browse files
Files changed (1) hide show
  1. templates/result.html +124 -131
templates/result.html CHANGED
@@ -1,132 +1,125 @@
1
- {% extends "base.html" %}
2
-
3
- {% block title %}Inference Result{% endblock %}
4
-
5
- {% block head_extra %}
6
- <style>
7
- .result-container {
8
- text-align: center;
9
- padding: 40px 20px;
10
- background-color: var(--card-background);
11
- border-radius: 12px;
12
- box-shadow: 0 8px 20px var(--shadow);
13
- margin-top: 40px;
14
- margin-bottom: 40px;
15
- animation: fadeInScale 0.8s ease-out forwards;
16
- }
17
-
18
- .result-container h2 {
19
- color: var(--primary-color);
20
- margin-bottom: 30px;
21
- font-size: 2.5em;
22
- }
23
-
24
- .result-video-wrapper {
25
- position: relative;
26
- padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
27
- height: 0;
28
- overflow: hidden;
29
- max-width: 100%;
30
- background: #000; /* Fallback for no video */
31
- border-radius: 10px;
32
- margin: 0 auto 30px;
33
- box-shadow: 0 4px 15px rgba(0,0,0,0.3);
34
- }
35
-
36
- .result-video-wrapper video {
37
- position: absolute;
38
- top: 0;
39
- left: 0;
40
- width: 100%;
41
- height: 100%;
42
- border-radius: 10px;
43
- }
44
-
45
- .download-button {
46
- background-color: var(--accent-color);
47
- color: #fff;
48
- padding: 12px 25px;
49
- border: none;
50
- border-radius: 5px;
51
- font-size: 1.1em;
52
- cursor: pointer;
53
- transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
54
- font-weight: 600;
55
- text-decoration: none; /* For the anchor tag */
56
- display: inline-block;
57
- margin-top: 20px;
58
- }
59
-
60
- .download-button:hover {
61
- background-color: var(--primary-color);
62
- transform: translateY(-2px);
63
- box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
64
- }
65
-
66
- .download-button:active {
67
- transform: translateY(0);
68
- box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
69
- }
70
-
71
- /* Flash message styling (re-used from index.html) */
72
- .flash-messages {
73
- list-style: none;
74
- padding: 0;
75
- margin: 20px 0;
76
- text-align: center;
77
- }
78
- .flash-messages li {
79
- padding: 10px 20px;
80
- margin-bottom: 10px;
81
- border-radius: 8px;
82
- font-weight: 600;
83
- display: inline-block;
84
- box-shadow: 0 2px 5px rgba(0,0,0,0.1);
85
- animation: fadeInOut 0.5s ease forwards;
86
- }
87
- .flash-messages .error {
88
- background-color: #dc3545;
89
- color: #fff;
90
- }
91
- .flash-messages .success {
92
- background-color: #28a745;
93
- color: #fff;
94
- }
95
- .flash-messages .info {
96
- background-color: #007bff;
97
- color: #fff;
98
- }
99
-
100
- @media (max-width: 768px) {
101
- .result-container {
102
- padding: 30px 15px;
103
- }
104
- .result-container h2 {
105
- font-size: 2em;
106
- }
107
- }
108
- </style>
109
- {% endblock %}
110
-
111
- {% block content %}
112
- <section class="result-container">
113
- <h2>Your Lip-Synced Video is Ready!</h2>
114
-
115
- <div class="result-video-wrapper">
116
- <video controls autoplay loop muted>
117
- {# This line is crucial. It now points to the new route that serves the file. #}
118
- <source src="{{ url_for('serve_result_video', filename=video_filename) }}" type="video/mp4">
119
- Your browser does not support the video tag.
120
- </video>
121
- </div>
122
-
123
- {# Update download link to new route #}
124
- <a href="{{ url_for('download_result', filename=video_filename) }}" class="download-button hover-grow" download>
125
- Download Video
126
- </a>
127
-
128
- <a href="{{ url_for('index') }}" class="cta-button hover-grow" style="margin-left: 20px;">
129
- Generate Another
130
- </a>
131
- </section>
132
  {% endblock %}
 
1
+ {% extends "base.html" %}
2
+
3
+ {% block title %}Result | AI Avatar Creator{% endblock %}
4
+
5
+ {% block head_extra %}
6
+ <style>
7
+ .result-container {
8
+ max-width: 800px;
9
+ margin: 0 auto;
10
+ text-align: center;
11
+ padding-top: 20px;
12
+ }
13
+
14
+ .hero-title {
15
+ font-size: 2.5rem;
16
+ font-weight: 700;
17
+ letter-spacing: -1px;
18
+ margin-bottom: 30px;
19
+ color: var(--text-main);
20
+ }
21
+
22
+ .hero-title span { color: var(--accent-blue); }
23
+
24
+ .video-card {
25
+ background: var(--card-bg);
26
+ border: 1px solid var(--card-border);
27
+ border-radius: 24px;
28
+ padding: 20px;
29
+ box-shadow: var(--shadow-card);
30
+ margin-bottom: 40px;
31
+ }
32
+
33
+ .video-wrapper {
34
+ position: relative;
35
+ padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
36
+ height: 0;
37
+ overflow: hidden;
38
+ background: #000;
39
+ border-radius: 16px;
40
+ box-shadow: 0 10px 30px rgba(0,0,0,0.1);
41
+ }
42
+
43
+ .video-wrapper video {
44
+ position: absolute;
45
+ top: 0;
46
+ left: 0;
47
+ width: 100%;
48
+ height: 100%;
49
+ border-radius: 16px;
50
+ }
51
+
52
+ .action-row {
53
+ display: flex;
54
+ justify-content: center;
55
+ gap: 16px;
56
+ flex-wrap: wrap;
57
+ }
58
+
59
+ .btn-primary {
60
+ background: var(--btn-dark);
61
+ color: var(--bg-window);
62
+ padding: 14px 28px;
63
+ border-radius: 30px;
64
+ font-weight: 600;
65
+ text-decoration: none;
66
+ display: inline-flex;
67
+ align-items: center;
68
+ gap: 10px;
69
+ transition: 0.2s;
70
+ box-shadow: 0 4px 15px rgba(0,0,0,0.1);
71
+ }
72
+ [data-theme="dark"] .btn-primary { color: #0f172a; }
73
+
74
+ .btn-primary:hover {
75
+ background: var(--btn-dark-hover);
76
+ transform: translateY(-2px);
77
+ }
78
+
79
+ .btn-secondary {
80
+ background: var(--card-bg);
81
+ color: var(--text-main);
82
+ border: 1px solid var(--card-border);
83
+ padding: 14px 28px;
84
+ border-radius: 30px;
85
+ font-weight: 600;
86
+ text-decoration: none;
87
+ display: inline-flex;
88
+ align-items: center;
89
+ gap: 10px;
90
+ transition: 0.2s;
91
+ }
92
+
93
+ .btn-secondary:hover {
94
+ background: var(--bg-body);
95
+ transform: translateY(-2px);
96
+ }
97
+ </style>
98
+ {% endblock %}
99
+
100
+ {% block content %}
101
+ <div class="result-container">
102
+ <h1 class="hero-title">
103
+ Your Avatar is <span>Ready!</span> 🎉
104
+ </h1>
105
+
106
+ <div class="video-card">
107
+ <div class="video-wrapper">
108
+ <video controls autoplay loop>
109
+ <source src="{{ url_for('serve_result_video', filename=video_filename) }}" type="video/mp4">
110
+ Your browser does not support the video tag.
111
+ </video>
112
+ </div>
113
+ </div>
114
+
115
+ <div class="action-row">
116
+ <a href="{{ url_for('download_result', filename=video_filename) }}" class="btn-primary" download>
117
+ <i class="fas fa-download"></i> Download Video
118
+ </a>
119
+
120
+ <a href="{{ url_for('index') }}" class="btn-secondary">
121
+ <i class="fas fa-redo"></i> Create Another
122
+ </a>
123
+ </div>
124
+ </div>
 
 
 
 
 
 
 
125
  {% endblock %}