jayllfpt commited on
Commit
2d13053
·
1 Parent(s): a145375

Update text normalization information in UI strings and enhance demo interface by setting default lines for target text input. Remove outdated log message in app.py for cleaner code.

Browse files
Files changed (2) hide show
  1. app.py +1 -1
  2. assets/ui_strings.py +2 -2
app.py CHANGED
@@ -17,7 +17,6 @@ from assets.text_samples import TARGET_TEXT_SAMPLES
17
 
18
 
19
  def log(msg: str):
20
- """打印带时间戳的日志"""
21
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
22
  print(f"[{timestamp}] {msg}")
23
 
@@ -317,6 +316,7 @@ def create_demo_interface():
317
  value="Trời trưa trong trẻo, trên triền núi trập trùng, lũ trẻ trâu trẻ trung tranh nhau thổi sáo trúc trong trẻo giữa trưa hè đầy trắc trở.",
318
  label=s0["target_label"],
319
  placeholder=s0["target_placeholder"],
 
320
  scale=20,
321
  )
322
  sample_random_btn = gr.Button("🎲", variant="secondary", scale=1, min_width=52)
 
17
 
18
 
19
  def log(msg: str):
 
20
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
21
  print(f"[{timestamp}] {msg}")
22
 
 
316
  value="Trời trưa trong trẻo, trên triền núi trập trùng, lũ trẻ trâu trẻ trung tranh nhau thổi sáo trúc trong trẻo giữa trưa hè đầy trắc trở.",
317
  label=s0["target_label"],
318
  placeholder=s0["target_placeholder"],
319
+ lines=4,
320
  scale=20,
321
  )
322
  sample_random_btn = gr.Button("🎲", variant="secondary", scale=1, min_width=52)
assets/ui_strings.py CHANGED
@@ -35,7 +35,7 @@ UI_STRINGS = {
35
  "timesteps_label": "Số bước suy luận (inference timesteps)",
36
  "timesteps_info": "Số bước suy luận dùng để tạo âm thanh; càng cao thường càng đẹp nhưng chậm hơn.",
37
  "normalize_label": "Chuẩn hoá văn bản (Text normalization)",
38
- "normalize_info": "Sử dụng thư viện wetext để chuẩn hoá văn bản tiếng Việt đầu vào.",
39
  "error_no_text": "Vui lòng nhập văn bản cần đọc.",
40
  },
41
  "en": {
@@ -74,7 +74,7 @@ UI_STRINGS = {
74
  "timesteps_label": "Inference Timesteps",
75
  "timesteps_info": "Number of inference timesteps; higher often improves quality but is slower.",
76
  "normalize_label": "Text Normalization",
77
- "normalize_info": "Use wetext library to normalize Vietnamese input text.",
78
  "error_no_text": "Please enter text to synthesize.",
79
  },
80
  }
 
35
  "timesteps_label": "Số bước suy luận (inference timesteps)",
36
  "timesteps_info": "Số bước suy luận dùng để tạo âm thanh; càng cao thường càng đẹp nhưng chậm hơn.",
37
  "normalize_label": "Chuẩn hoá văn bản (Text normalization)",
38
+ "normalize_info": "Sử dụng thư viện soe-vinorm để chuẩn hoá văn bản tiếng Việt đầu vào.",
39
  "error_no_text": "Vui lòng nhập văn bản cần đọc.",
40
  },
41
  "en": {
 
74
  "timesteps_label": "Inference Timesteps",
75
  "timesteps_info": "Number of inference timesteps; higher often improves quality but is slower.",
76
  "normalize_label": "Text Normalization",
77
+ "normalize_info": "Use soe-vinorm library to normalize Vietnamese input text.",
78
  "error_no_text": "Please enter text to synthesize.",
79
  },
80
  }