Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -117,8 +117,7 @@ if __name__ == "__main__":
|
|
117 |
css='''
|
118 |
#main {background-color: #ffffff;opacity: 0.8;background-image: repeating-linear-gradient(45deg, #edffe1 25%, transparent 25%, transparent 75%, #edffe1 75%, #edffe1), repeating-linear-gradient(45deg, #edffe1 25%, #ffffff 25%, #ffffff 75%, #edffe1 75%, #edffe1);
|
119 |
background-position: 0 0, 40px 40px;background-size: 80px 80px;}
|
120 |
-
#
|
121 |
-
#btn {background-color:#fff;border-radius: 0;border:1px solid cyan}
|
122 |
'''
|
123 |
|
124 |
with gr.Blocks(css=css) as app:
|
@@ -129,15 +128,15 @@ background-position: 0 0, 40px 40px;background-size: 80px 80px;}
|
|
129 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
130 |
value="在不在?能不能借给我三百块钱买可乐",
|
131 |
info="使用huggingface的免费CPU进行推理,因此速度不快,一次性不要输入超过500汉字",
|
132 |
-
|
133 |
-
model = gr.Radio(choices=list(models.keys()), value=list(models.keys())[0], label='音声模型'
|
134 |
gr.Markdown(value="生成参数")
|
135 |
-
sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label='语调变化'
|
136 |
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
|
137 |
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.9, step=0.01, label='音节长度')
|
138 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='生成语音总长度')
|
139 |
btn = gr.Button("✨生成", variant="primary",elem_id="btn")
|
140 |
-
with gr.Column(
|
141 |
text_output = gr.Textbox(label="Message")
|
142 |
audio_output = gr.Audio(label="试听")
|
143 |
MP3_output = gr.File(label="下载")
|
|
|
117 |
css='''
|
118 |
#main {background-color: #ffffff;opacity: 0.8;background-image: repeating-linear-gradient(45deg, #edffe1 25%, transparent 25%, transparent 75%, #edffe1 75%, #edffe1), repeating-linear-gradient(45deg, #edffe1 25%, #ffffff 25%, #ffffff 75%, #edffe1 75%, #edffe1);
|
119 |
background-position: 0 0, 40px 40px;background-size: 80px 80px;}
|
120 |
+
#btn {background-color:transparent;border-radius: 0;border:1px solid cyan}
|
|
|
121 |
'''
|
122 |
|
123 |
with gr.Blocks(css=css) as app:
|
|
|
128 |
text = gr.TextArea(label="Text", placeholder="Input Text Here",
|
129 |
value="在不在?能不能借给我三百块钱买可乐",
|
130 |
info="使用huggingface的免费CPU进行推理,因此速度不快,一次性不要输入超过500汉字",
|
131 |
+
)
|
132 |
+
model = gr.Radio(choices=list(models.keys()), value=list(models.keys())[0], label='音声模型')
|
133 |
gr.Markdown(value="生成参数")
|
134 |
+
sdp_ratio = gr.Slider(minimum=0, maximum=1, value=0.2, step=0.01, label='语调变化')
|
135 |
noise_scale = gr.Slider(minimum=0.1, maximum=1.5, value=0.5, step=0.01, label='感情变化')
|
136 |
noise_scale_w = gr.Slider(minimum=0.1, maximum=1.4, value=0.9, step=0.01, label='音节长度')
|
137 |
length_scale = gr.Slider(minimum=0.1, maximum=2, value=1, step=0.01, label='生成语音总长度')
|
138 |
btn = gr.Button("✨生成", variant="primary",elem_id="btn")
|
139 |
+
with gr.Column():
|
140 |
text_output = gr.Textbox(label="Message")
|
141 |
audio_output = gr.Audio(label="试听")
|
142 |
MP3_output = gr.File(label="下载")
|