diff --git a/.Jules/palette.md b/.Jules/palette.md index 27856ba8..4c25f293 100644 --- a/.Jules/palette.md +++ b/.Jules/palette.md @@ -1,3 +1,7 @@ ## 2025-02-18 - Gradio Icon-Only Buttons **Learning:** This Gradio app frequently uses icon-only buttons (like 🎲) without text labels or tooltips, making them inaccessible and unclear. **Action:** Always verify if `gr.Button` has a descriptive label or if `info` params are available on associated components to provide context. + +## 2026-02-07 - Numeric Input Units and Sentinel Values +**Learning:** Users struggle to guess units (e.g., seconds vs steps) and sentinel values (e.g., -1 for "end of track") in Gradio numeric inputs without explicit guidance. +**Action:** Always use the `info` parameter on `gr.Number` to explicitly state the unit of measurement and the meaning of any special values like -1 or 0. diff --git a/acestep/gradio_ui/i18n/en.json b/acestep/gradio_ui/i18n/en.json index fdc3992f..2f528dc1 100644 --- a/acestep/gradio_ui/i18n/en.json +++ b/acestep/gradio_ui/i18n/en.json @@ -85,8 +85,10 @@ "transcribe_btn": "Transcribe", "repainting_controls": "🎨 Repainting Controls (seconds)", "repainting_start": "Repainting Start", + "repainting_start_info": "Start time in seconds for repainting (0 = beginning)", "set_start_btn": "Set Start", "repainting_end": "Repainting End", + "repainting_end_info": "End time in seconds for repainting (-1 = end of track)", "set_end_btn": "Set End", "mode_label": "Generation Mode", "mode_info": "Simple: describe music in natural language. Custom: full control over caption and lyrics.", diff --git a/acestep/gradio_ui/i18n/ja.json b/acestep/gradio_ui/i18n/ja.json index 6653e0b3..fe54e313 100644 --- a/acestep/gradio_ui/i18n/ja.json +++ b/acestep/gradio_ui/i18n/ja.json @@ -82,7 +82,9 @@ "transcribe_btn": "転写", "repainting_controls": "🎨 再描画コントロール(秒)", "repainting_start": "再描画開始", + "repainting_start_info": "再描画開始時間(秒) (0 = 開始)", "repainting_end": "再描画終了", + "repainting_end_info": "再描画終了時間(秒) (-1 = トラック終了)", "mode_label": "生成モード", "mode_info": "シンプル:自然言語で音楽を説明。カスタム:キャプションと歌詞を完全にコントロール。", "mode_simple": "シンプル", diff --git a/acestep/gradio_ui/i18n/zh.json b/acestep/gradio_ui/i18n/zh.json index 8bf5a463..c6c4d3ab 100644 --- a/acestep/gradio_ui/i18n/zh.json +++ b/acestep/gradio_ui/i18n/zh.json @@ -82,7 +82,9 @@ "transcribe_btn": "转录", "repainting_controls": "🎨 重绘控制(秒)", "repainting_start": "重绘开始", + "repainting_start_info": "重绘开始时间(秒) (0 = 开始)", "repainting_end": "重绘结束", + "repainting_end_info": "重绘结束时间(秒) (-1 = 轨道结束)", "mode_label": "生成模式", "mode_info": "简单模式:用自然语言描述音乐。自定义模式:完全控制描述和歌词。", "mode_simple": "简单", diff --git a/acestep/gradio_ui/interfaces/generation.py b/acestep/gradio_ui/interfaces/generation.py index d9389682..7ddf515b 100644 --- a/acestep/gradio_ui/interfaces/generation.py +++ b/acestep/gradio_ui/interfaces/generation.py @@ -297,6 +297,7 @@ def create_generation_section(dit_handler, llm_handler, init_params=None, langua value=0.0, step=0.1, scale=2, + info=t("generation.repainting_start_info"), ) set_start_btn = gr.Button( t("generation.set_start_btn"), @@ -309,6 +310,7 @@ def create_generation_section(dit_handler, llm_handler, init_params=None, langua minimum=-1, step=0.1, scale=2, + info=t("generation.repainting_end_info"), ) set_end_btn = gr.Button( t("generation.set_end_btn"),