From 33944b7a45d82d0fa103aad6d2ff683cd70512d0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Sat, 9 Sep 2023 03:35:56 +0000 Subject: [PATCH] Format code --- webui.py | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/webui.py b/webui.py index b7b343a..7464eb2 100644 --- a/webui.py +++ b/webui.py @@ -25,15 +25,13 @@ import webbrowser net_g = None -if ( - sys.platform == "darwin" - and torch.backends.mps.is_available() - ): +if sys.platform == "darwin" and torch.backends.mps.is_available(): device = "mps" os.environ["PYTORCH_ENABLE_MPS_FALLBACK"] = "1" else: device = "cuda" + def get_text(text, language_str, hps): norm_text, phone, tone, word2ph = clean_text(text, language_str) phone, tone, language = cleaned_text_to_sequence(phone, tone, language_str) @@ -207,7 +205,15 @@ if __name__ == "__main__": btn.click( tts_fn, - inputs=[text, speaker, sdp_ratio, noise_scale, noise_scale_w, length_scale, language], + inputs=[ + text, + speaker, + sdp_ratio, + noise_scale, + noise_scale_w, + length_scale, + language, + ], outputs=[text_output, audio_output], )