Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -40,7 +40,7 @@ def create_tts_fn(net_g_ms, speaker_id):
|
|
40 |
text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
|
41 |
if limitation:
|
42 |
text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
|
43 |
-
max_len =
|
44 |
if is_symbol:
|
45 |
max_len *= 3
|
46 |
if text_len > max_len:
|
@@ -216,7 +216,7 @@ if __name__ == '__main__':
|
|
216 |
)
|
217 |
with gr.Row():
|
218 |
with gr.Column():
|
219 |
-
input_text = gr.Textbox(label="文本
|
220 |
lang = gr.Dropdown(label="语言", choices=["中文", "日语", "中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)"],
|
221 |
type="index", value="中文"if language == "Chinese" else "日语")
|
222 |
with gr.Accordion(label="高级选项", open=False):
|
|
|
40 |
text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
|
41 |
if limitation:
|
42 |
text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
|
43 |
+
max_len = 500
|
44 |
if is_symbol:
|
45 |
max_len *= 3
|
46 |
if text_len > max_len:
|
|
|
216 |
)
|
217 |
with gr.Row():
|
218 |
with gr.Column():
|
219 |
+
input_text = gr.Textbox(label="文本" if limitation else "文本", lines=5, value=example, elem_id=f"input-text-zh-{name_zh}")
|
220 |
lang = gr.Dropdown(label="语言", choices=["中文", "日语", "中日混合(中文用[ZH][ZH]包裹起来,日文用[JA][JA]包裹起来)"],
|
221 |
type="index", value="中文"if language == "Chinese" else "日语")
|
222 |
with gr.Accordion(label="高级选项", open=False):
|