Spaces:
Build error
Build error
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 text_len > max_len:
|
45 |
return "Error: Text is too long", None
|
46 |
if language == 0:
|
@@ -137,7 +137,7 @@ if __name__ == '__main__':
|
|
137 |
)
|
138 |
with gr.Row():
|
139 |
with gr.Column():
|
140 |
-
input_text = gr.Textbox(label="Text (
|
141 |
lang = gr.Dropdown(label="Language", choices=["Chinese", "Japanese", "Mix(wrap the Chinese text with [ZH][ZH], wrap the Japanese text with [JA][JA])"],
|
142 |
type="index", value=language)
|
143 |
btn = gr.Button(value="Generate")
|
|
|
40 |
text = text.replace('\n', ' ').replace('\r', '').replace(" ", "")
|
41 |
if limitation:
|
42 |
text_len = len(re.sub("\[([A-Z]{2})\]", "", text))
|
43 |
+
max_len = 300
|
44 |
if text_len > max_len:
|
45 |
return "Error: Text is too long", None
|
46 |
if language == 0:
|
|
|
137 |
)
|
138 |
with gr.Row():
|
139 |
with gr.Column():
|
140 |
+
input_text = gr.Textbox(label="Text (300 words limitation)", lines=5, value=example, elem_id=f"input-text-en-{name_en.replace(' ','')}")
|
141 |
lang = gr.Dropdown(label="Language", choices=["Chinese", "Japanese", "Mix(wrap the Chinese text with [ZH][ZH], wrap the Japanese text with [JA][JA])"],
|
142 |
type="index", value=language)
|
143 |
btn = gr.Button(value="Generate")
|