Update app.py
Browse files57 unmodified lines5859606162635 unmodified lines697071727374757677781 unmodified line808182838485868757 unmodified linesNone,)style = 'en_' + styleelse:if style not in ['default']:5 unmodified linesNone,)style = 'cn_' + stylespeaker_wav = audio_file_pthif len(prompt) < 2:text_hint += f"[ERROR] Please give a longer prompt text \n"gr.Warning("Please give a longer prompt text")return (1 unmodified lineNone,None,)if len(prompt) > 200:text_hint += f"[ERROR] Text length limited to 200 characters for this demo, please try shorter text. You can clone our open-source repo and try for your usage \n"gr.Warning("Text length limited to 200 characters for this demo, please try shorter text. You can clone our open-source repo for your usage")57 unmodified lines585960616263645 unmodified lines70717273747576777879801 unmodified line828384858687888957 unmodified linesNone,)style = 'en_' + styleprompt_length = len(prompt.split(' '))else:if style not in ['default']:5 unmodified linesNone,)style = 'cn_' + styleprompt_length = len(prompt)speaker_wav = audio_file_pthif prompt_length < 2:text_hint += f"[ERROR] Please give a longer prompt text \n"gr.Warning("Please give a longer prompt text")return (1 unmodified lineNone,None,)if prompt_length > 50:text_hint += f"[ERROR] Text length limited to 50 words for this demo, please try shorter text. You can clone our open-source repo and try for your usage \n"gr.Warning("Text length limited to 200 characters for this demo, please try shorter text. You can clone our open-source repo for your usage")
app.py+5-3