diff --git a/modules/i18n.py b/modules/i18n.py index 9f6b0338..d1578e7b 100644 --- a/modules/i18n.py +++ b/modules/i18n.py @@ -95,7 +95,7 @@ _ZH_TW = { "Send to notebook": "發送到筆記本", "Send to Notebook": "發送到筆記本", "Chat template": "聊天模板", - "Send": "傳送", + # duplicate key removed; keep single mapping for "Send" "Regenerate (Ctrl + Enter)": "重新生成(Ctrl + Enter)", "Continue (Alt + Enter)": "繼續(Alt + Enter)", "Remove last reply (Ctrl + Shift + Backspace)": "移除上一則回覆(Ctrl + Shift + Backspace)", @@ -250,7 +250,7 @@ _ZH_TW = { "top_k": "top_k Top-k", "typical_p": "typical_p Typical-p", "dry_multiplier": "dry 乘數", - "dry_allowed_length": "允許重複長度", + # duplicate key removed; keep prefixed form above "Good morning!": "早安!", "Good afternoon!": "午安!", "Good evening!": "晚安!", diff --git a/modules/ui_model_menu.py b/modules/ui_model_menu.py index 2d8a2db9..82d63508 100644 --- a/modules/ui_model_menu.py +++ b/modules/ui_model_menu.py @@ -330,7 +330,7 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur specific_file=specific_file ) update_queue.put(("COMPLETED", f"Model successfully saved to `{output_folder}/`.")) - except Exception as e: + except Exception: tb_str = traceback.format_exc().replace('\n', '\n\n') update_queue.put(("ERROR", tb_str)) @@ -365,7 +365,7 @@ def download_model_wrapper(repo_id, specific_file, progress=gr.Progress(), retur download_thread.join() - except Exception as e: + except Exception: progress(0.0) tb_str = traceback.format_exc().replace('\n', '\n\n') yield tb_str