playmak3r commited on
Commit
6ec47b5
Β·
1 Parent(s): 804fd09

refactor: create "static" folder

Browse files
app.py CHANGED
@@ -23,203 +23,7 @@ def create_demo_interface(demo_instance: VibeVoiceDemo):
23
  """Create the Gradio interface with streaming support."""
24
 
25
  # Custom CSS for high-end aesthetics with lighter theme
26
- custom_css = """
27
- /* Modern light theme with gradients */
28
- .gradio-container {
29
- background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
30
- font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
31
- }
32
-
33
- /* Header styling */
34
- .main-header {
35
- background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
36
- padding: 2rem;
37
- border-radius: 20px;
38
- margin-bottom: 2rem;
39
- text-align: center;
40
- box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
41
- }
42
-
43
- .main-header h1 {
44
- color: white;
45
- font-size: 2.5rem;
46
- font-weight: 700;
47
- margin: 0;
48
- text-shadow: 0 2px 4px rgba(0,0,0,0.3);
49
- }
50
-
51
- .main-header p {
52
- color: rgba(255,255,255,0.9);
53
- font-size: 1.1rem;
54
- margin: 0.5rem 0 0 0;
55
- }
56
-
57
- /* Card styling */
58
- .settings-card, .generation-card {
59
- background: rgba(255, 255, 255, 0.8);
60
- backdrop-filter: blur(10px);
61
- border: 1px solid rgba(226, 232, 240, 0.8);
62
- border-radius: 16px;
63
- padding: 1.5rem;
64
- margin-bottom: 1rem;
65
- box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
66
- }
67
-
68
- /* Speaker selection styling */
69
- .speaker-grid {
70
- display: grid;
71
- gap: 1rem;
72
- margin-bottom: 1rem;
73
- }
74
-
75
- .speaker-item {
76
- background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
77
- border: 1px solid rgba(148, 163, 184, 0.4);
78
- border-radius: 12px;
79
- padding: 1rem;
80
- color: #374151;
81
- font-weight: 500;
82
- }
83
-
84
- /* Streaming indicator */
85
- .streaming-indicator {
86
- display: inline-block;
87
- width: 10px;
88
- height: 10px;
89
- background: #22c55e;
90
- border-radius: 50%;
91
- margin-right: 8px;
92
- animation: pulse 1.5s infinite;
93
- }
94
-
95
- @keyframes pulse {
96
- 0% { opacity: 1; transform: scale(1); }
97
- 50% { opacity: 0.5; transform: scale(1.1); }
98
- 100% { opacity: 1; transform: scale(1); }
99
- }
100
-
101
- /* Queue status styling */
102
- .queue-status {
103
- background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
104
- border: 1px solid rgba(14, 165, 233, 0.3);
105
- border-radius: 8px;
106
- padding: 0.75rem;
107
- margin: 0.5rem 0;
108
- text-align: center;
109
- font-size: 0.9rem;
110
- color: #0369a1;
111
- }
112
-
113
- .generate-btn {
114
- background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
115
- border: none;
116
- border-radius: 12px;
117
- padding: 1rem 2rem;
118
- color: white;
119
- font-weight: 600;
120
- font-size: 1.1rem;
121
- box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
122
- transition: all 0.3s ease;
123
- }
124
-
125
- .generate-btn:hover {
126
- transform: translateY(-2px);
127
- box-shadow: 0 6px 25px rgba(5, 150, 105, 0.6);
128
- }
129
-
130
- .stop-btn {
131
- background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
132
- border: none;
133
- border-radius: 12px;
134
- padding: 1rem 2rem;
135
- color: white;
136
- font-weight: 600;
137
- font-size: 1.1rem;
138
- box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
139
- transition: all 0.3s ease;
140
- }
141
-
142
- .stop-btn:hover {
143
- transform: translateY(-2px);
144
- box-shadow: 0 6px 25px rgba(239, 68, 68, 0.6);
145
- }
146
-
147
- /* Audio player styling */
148
- .audio-output {
149
- background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
150
- border-radius: 16px;
151
- padding: 1.5rem;
152
- border: 1px solid rgba(148, 163, 184, 0.3);
153
- }
154
-
155
- .complete-audio-section {
156
- margin-top: 1rem;
157
- padding: 1rem;
158
- background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
159
- border: 1px solid rgba(34, 197, 94, 0.3);
160
- border-radius: 12px;
161
- }
162
-
163
- /* Text areas */
164
- .script-input, .log-output {
165
- background: rgba(255, 255, 255, 0.9) !important;
166
- border: 1px solid rgba(148, 163, 184, 0.4) !important;
167
- border-radius: 12px !important;
168
- color: #1e293b !important;
169
- font-family: 'JetBrains Mono', monospace !important;
170
- }
171
-
172
- .script-input::placeholder {
173
- color: #64748b !important;
174
- }
175
-
176
- /* Sliders */
177
- .slider-container {
178
- background: rgba(248, 250, 252, 0.8);
179
- border: 1px solid rgba(226, 232, 240, 0.6);
180
- border-radius: 8px;
181
- padding: 1rem;
182
- margin: 0.5rem 0;
183
- }
184
-
185
- /* Labels and text */
186
- .gradio-container label {
187
- color: #374151 !important;
188
- font-weight: 600 !important;
189
- }
190
-
191
- .gradio-container .markdown {
192
- color: #1f2937 !important;
193
- }
194
-
195
- /* Responsive design */
196
- @media (max-width: 768px) {
197
- .main-header h1 { font-size: 2rem; }
198
- .settings-card, .generation-card { padding: 1rem; }
199
- }
200
-
201
- /* Random example button styling - more subtle professional color */
202
- .random-btn {
203
- background: linear-gradient(135deg, #64748b 0%, #475569 100%);
204
- border: none;
205
- border-radius: 12px;
206
- padding: 1rem 1.5rem;
207
- color: white;
208
- font-weight: 600;
209
- font-size: 1rem;
210
- box-shadow: 0 4px 20px rgba(100, 116, 139, 0.3);
211
- transition: all 0.3s ease;
212
- display: inline-flex;
213
- align-items: center;
214
- gap: 0.5rem;
215
- }
216
-
217
- .random-btn:hover {
218
- transform: translateY(-2px);
219
- box-shadow: 0 6px 25px rgba(100, 116, 139, 0.4);
220
- background: linear-gradient(135deg, #475569 0%, #334155 100%);
221
- }
222
- """
223
 
224
  with gr.Blocks(
225
  title="VibeVoice - AI Podcast Generator",
 
23
  """Create the Gradio interface with streaming support."""
24
 
25
  # Custom CSS for high-end aesthetics with lighter theme
26
+ custom_css = ""
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
  with gr.Blocks(
29
  title="VibeVoice - AI Podcast Generator",
static/style.css ADDED
@@ -0,0 +1,195 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ /* Modern light theme with gradients */
2
+ .gradio-container {
3
+ background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
4
+ font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, sans-serif;
5
+ }
6
+
7
+ /* Header styling */
8
+ .main-header {
9
+ background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
10
+ padding: 2rem;
11
+ border-radius: 20px;
12
+ margin-bottom: 2rem;
13
+ text-align: center;
14
+ box-shadow: 0 10px 40px rgba(102, 126, 234, 0.3);
15
+ }
16
+
17
+ .main-header h1 {
18
+ color: white;
19
+ font-size: 2.5rem;
20
+ font-weight: 700;
21
+ margin: 0;
22
+ text-shadow: 0 2px 4px rgba(0,0,0,0.3);
23
+ }
24
+
25
+ .main-header p {
26
+ color: rgba(255,255,255,0.9);
27
+ font-size: 1.1rem;
28
+ margin: 0.5rem 0 0 0;
29
+ }
30
+
31
+ /* Card styling */
32
+ .settings-card, .generation-card {
33
+ background: rgba(255, 255, 255, 0.8);
34
+ backdrop-filter: blur(10px);
35
+ border: 1px solid rgba(226, 232, 240, 0.8);
36
+ border-radius: 16px;
37
+ padding: 1.5rem;
38
+ margin-bottom: 1rem;
39
+ box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
40
+ }
41
+
42
+ /* Speaker selection styling */
43
+ .speaker-grid {
44
+ display: grid;
45
+ gap: 1rem;
46
+ margin-bottom: 1rem;
47
+ }
48
+
49
+ .speaker-item {
50
+ background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
51
+ border: 1px solid rgba(148, 163, 184, 0.4);
52
+ border-radius: 12px;
53
+ padding: 1rem;
54
+ color: #374151;
55
+ font-weight: 500;
56
+ }
57
+
58
+ /* Streaming indicator */
59
+ .streaming-indicator {
60
+ display: inline-block;
61
+ width: 10px;
62
+ height: 10px;
63
+ background: #22c55e;
64
+ border-radius: 50%;
65
+ margin-right: 8px;
66
+ animation: pulse 1.5s infinite;
67
+ }
68
+
69
+ @keyframes pulse {
70
+ 0% { opacity: 1; transform: scale(1); }
71
+ 50% { opacity: 0.5; transform: scale(1.1); }
72
+ 100% { opacity: 1; transform: scale(1); }
73
+ }
74
+
75
+ /* Queue status styling */
76
+ .queue-status {
77
+ background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
78
+ border: 1px solid rgba(14, 165, 233, 0.3);
79
+ border-radius: 8px;
80
+ padding: 0.75rem;
81
+ margin: 0.5rem 0;
82
+ text-align: center;
83
+ font-size: 0.9rem;
84
+ color: #0369a1;
85
+ }
86
+
87
+ .generate-btn {
88
+ background: linear-gradient(135deg, #059669 0%, #0d9488 100%);
89
+ border: none;
90
+ border-radius: 12px;
91
+ padding: 1rem 2rem;
92
+ color: white;
93
+ font-weight: 600;
94
+ font-size: 1.1rem;
95
+ box-shadow: 0 4px 20px rgba(5, 150, 105, 0.4);
96
+ transition: all 0.3s ease;
97
+ }
98
+
99
+ .generate-btn:hover {
100
+ transform: translateY(-2px);
101
+ box-shadow: 0 6px 25px rgba(5, 150, 105, 0.6);
102
+ }
103
+
104
+ .stop-btn {
105
+ background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
106
+ border: none;
107
+ border-radius: 12px;
108
+ padding: 1rem 2rem;
109
+ color: white;
110
+ font-weight: 600;
111
+ font-size: 1.1rem;
112
+ box-shadow: 0 4px 20px rgba(239, 68, 68, 0.4);
113
+ transition: all 0.3s ease;
114
+ }
115
+
116
+ .stop-btn:hover {
117
+ transform: translateY(-2px);
118
+ box-shadow: 0 6px 25px rgba(239, 68, 68, 0.6);
119
+ }
120
+
121
+ /* Audio player styling */
122
+ .audio-output {
123
+ background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
124
+ border-radius: 16px;
125
+ padding: 1.5rem;
126
+ border: 1px solid rgba(148, 163, 184, 0.3);
127
+ }
128
+
129
+ .complete-audio-section {
130
+ margin-top: 1rem;
131
+ padding: 1rem;
132
+ background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
133
+ border: 1px solid rgba(34, 197, 94, 0.3);
134
+ border-radius: 12px;
135
+ }
136
+
137
+ /* Text areas */
138
+ .script-input, .log-output {
139
+ background: rgba(255, 255, 255, 0.9) !important;
140
+ border: 1px solid rgba(148, 163, 184, 0.4) !important;
141
+ border-radius: 12px !important;
142
+ color: #1e293b !important;
143
+ font-family: 'JetBrains Mono', monospace !important;
144
+ }
145
+
146
+ .script-input::placeholder {
147
+ color: #64748b !important;
148
+ }
149
+
150
+ /* Sliders */
151
+ .slider-container {
152
+ background: rgba(248, 250, 252, 0.8);
153
+ border: 1px solid rgba(226, 232, 240, 0.6);
154
+ border-radius: 8px;
155
+ padding: 1rem;
156
+ margin: 0.5rem 0;
157
+ }
158
+
159
+ /* Labels and text */
160
+ .gradio-container label {
161
+ color: #374151 !important;
162
+ font-weight: 600 !important;
163
+ }
164
+
165
+ .gradio-container .markdown {
166
+ color: #1f2937 !important;
167
+ }
168
+
169
+ /* Responsive design */
170
+ @media (max-width: 768px) {
171
+ .main-header h1 { font-size: 2rem; }
172
+ .settings-card, .generation-card { padding: 1rem; }
173
+ }
174
+
175
+ /* Random example button styling - more subtle professional color */
176
+ .random-btn {
177
+ background: linear-gradient(135deg, #64748b 0%, #475569 100%);
178
+ border: none;
179
+ border-radius: 12px;
180
+ padding: 1rem 1.5rem;
181
+ color: white;
182
+ font-weight: 600;
183
+ font-size: 1rem;
184
+ box-shadow: 0 4px 20px rgba(100, 116, 139, 0.3);
185
+ transition: all 0.3s ease;
186
+ display: inline-flex;
187
+ align-items: center;
188
+ gap: 0.5rem;
189
+ }
190
+
191
+ .random-btn:hover {
192
+ transform: translateY(-2px);
193
+ box-shadow: 0 6px 25px rgba(100, 116, 139, 0.4);
194
+ background: linear-gradient(135deg, #475569 0%, #334155 100%);
195
+ }
{text_examples β†’ static/text_examples}/1p_Ch2EN.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/1p_abs.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/2p_goat.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/2p_music.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/2p_short.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/2p_yayi.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/3p_gpt5.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/4p_climate_100min.txt RENAMED
File without changes
{text_examples β†’ static/text_examples}/4p_climate_45min.txt RENAMED
File without changes
{voices β†’ static/voices}/en-Alice_woman.wav RENAMED
File without changes
{voices β†’ static/voices}/en-Carter_man.wav RENAMED
File without changes
{voices β†’ static/voices}/en-Frank_man.wav RENAMED
File without changes
{voices β†’ static/voices}/en-Mary_woman_bgm.wav RENAMED
File without changes
{voices β†’ static/voices}/en-Maya_woman.wav RENAMED
File without changes
{voices β†’ static/voices}/in-Samuel_man.wav RENAMED
File without changes
{voices β†’ static/voices}/zh-Anchen_man_bgm.wav RENAMED
File without changes
{voices β†’ static/voices}/zh-Bowen_man.wav RENAMED
File without changes
{voices β†’ static/voices}/zh-Xinran_woman.wav RENAMED
File without changes