Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -115,14 +115,40 @@ if __name__ == "__main__":
|
|
115 |
speaker = list(speaker_ids.keys())[0]
|
116 |
|
117 |
css='''
|
118 |
-
|
119 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
120 |
#btn {border: 2px solid #3ed6e500; margin-left: auto; margin-right: auto;background-color:#3ed6e500;border-radius: 5px;
|
121 |
:hover{color: #92ccd8; } }
|
122 |
'''
|
123 |
|
124 |
with gr.Blocks(css=css) as app:
|
125 |
-
with gr.Row(elem_id="main"):
|
126 |
with gr.Column():
|
127 |
|
128 |
gr.Markdown("测试用")
|
@@ -137,7 +163,7 @@ if __name__ == "__main__":
|
|
137 |
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
|
138 |
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.9, step=0.01, label='音节长度')
|
139 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='生成语音总长度')
|
140 |
-
btn = gr.Button("生成", variant="primary")
|
141 |
with gr.Column():
|
142 |
text_output = gr.Textbox(label="Message")
|
143 |
audio_output = gr.Audio(label="试听")
|
|
|
115 |
speaker = list(speaker_ids.keys())[0]
|
116 |
|
117 |
css='''
|
118 |
+
@keyframes scanline {0.01% {
|
119 |
+
height: 0;
|
120 |
+
}
|
121 |
+
99.99% {
|
122 |
+
height: 100%
|
123 |
+
}
|
124 |
+
100% {
|
125 |
+
height: 0;
|
126 |
+
}
|
127 |
+
}
|
128 |
+
|
129 |
+
|
130 |
+
.scanline {
|
131 |
+
position: fixed;
|
132 |
+
top: 0;
|
133 |
+
left: 0;
|
134 |
+
right: 0;
|
135 |
+
bottom: 0;
|
136 |
+
background: rgba(255,255,255,0.02);
|
137 |
+
animation: scanline 8s linear infinite;
|
138 |
+
pointer-events: none;
|
139 |
+
}
|
140 |
+
|
141 |
+
#main {background-color: darken(red, 47%);
|
142 |
+
background-size: 100px;
|
143 |
+
color: red;
|
144 |
+
height: 100%;};
|
145 |
+
#elements {background-color:transparent;}
|
146 |
#btn {border: 2px solid #3ed6e500; margin-left: auto; margin-right: auto;background-color:#3ed6e500;border-radius: 5px;
|
147 |
:hover{color: #92ccd8; } }
|
148 |
'''
|
149 |
|
150 |
with gr.Blocks(css=css) as app:
|
151 |
+
with gr.Row(elem_id="main",elem_classes="scanline"):
|
152 |
with gr.Column():
|
153 |
|
154 |
gr.Markdown("测试用")
|
|
|
163 |
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
|
164 |
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.9, step=0.01, label='音节长度')
|
165 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='生成语音总长度')
|
166 |
+
btn = gr.Button("生成", variant="primary",elem_id="btn")
|
167 |
with gr.Column():
|
168 |
text_output = gr.Textbox(label="Message")
|
169 |
audio_output = gr.Audio(label="试听")
|