From d32d84303341468a51722872707dc6087040b6d9 Mon Sep 17 00:00:00 2001 From: Kostis-S-Z Date: Fri, 6 Dec 2024 19:25:04 +0200 Subject: [PATCH] Add different content in text areas to prevent duplicate widget id --- demo/app.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/demo/app.py b/demo/app.py index 6356b74..bf61ba9 100644 --- a/demo/app.py +++ b/demo/app.py @@ -71,12 +71,18 @@ def load_text_to_speech_model_and_tokenizer(): raw_text = DATA_LOADERS[extension](uploaded_file) with col1: st.subheader("Raw Text") - st.text_area(f"Total Length: {len(raw_text)}", f"{raw_text[:500]} . . .") + st.text_area( + f"Number of characters before cleaning: {len(raw_text)}", + f"{raw_text[:500]} . . .", + ) clean_text = DATA_CLEANERS[extension](raw_text) with col2: st.subheader("Cleaned Text") - st.text_area(f"Total Length: {len(clean_text)}", f"{clean_text[:500]} . . .") + st.text_area( + f"Number of characters after cleaning: {len(clean_text)}", + f"{clean_text[:500]} . . .", + ) st.divider() st.header("Downloading and Loading models")