brzhang
commited on
Commit
·
379b995
1
Parent(s):
daf74c4
feat:设置语音
Browse files- ChuanhuChatbot.py +2 -2
- locale/en_US.json +71 -71
- modules/presets.py +3 -2
ChuanhuChatbot.py
CHANGED
|
@@ -264,7 +264,7 @@ with gr.Blocks(css=customCSS, theme=small_and_beautiful_theme) as demo:
|
|
| 264 |
changeProxyBtn = gr.Button(i18n("🔄 设置代理地址"))
|
| 265 |
default_btn = gr.Button(i18n("🔙 恢复默认设置"))
|
| 266 |
|
| 267 |
-
gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
|
| 268 |
gr.HTML(get_html("footer.html").format(versions=versions_html()), elem_id="footer")
|
| 269 |
|
| 270 |
# https://github.com/gradio-app/gradio/pull/3296
|
|
@@ -463,7 +463,7 @@ logging.info(
|
|
| 463 |
+ colorama.Style.RESET_ALL
|
| 464 |
)
|
| 465 |
# 默认开启本地服务器,默认可以直接从IP访问,默认不创建公开分享链接
|
| 466 |
-
demo.title = i18n("
|
| 467 |
|
| 468 |
if __name__ == "__main__":
|
| 469 |
reload_javascript()
|
|
|
|
| 264 |
changeProxyBtn = gr.Button(i18n("🔄 设置代理地址"))
|
| 265 |
default_btn = gr.Button(i18n("🔙 恢复默认设置"))
|
| 266 |
|
| 267 |
+
# gr.Markdown(CHUANHU_DESCRIPTION, elem_id="description")
|
| 268 |
gr.HTML(get_html("footer.html").format(versions=versions_html()), elem_id="footer")
|
| 269 |
|
| 270 |
# https://github.com/gradio-app/gradio/pull/3296
|
|
|
|
| 463 |
+ colorama.Style.RESET_ALL
|
| 464 |
)
|
| 465 |
# 默认开启本地服务器,默认可以直接从IP访问,默认不创建公开分享链接
|
| 466 |
+
demo.title = i18n("智能对话机器人 🚀")
|
| 467 |
|
| 468 |
if __name__ == "__main__":
|
| 469 |
reload_javascript()
|
locale/en_US.json
CHANGED
|
@@ -1,73 +1,73 @@
|
|
| 1 |
{
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
|
| 55 |
-
|
| 56 |
-
|
| 57 |
-
|
| 58 |
-
|
| 59 |
-
|
| 60 |
-
|
| 61 |
-
|
| 62 |
-
|
| 63 |
-
|
| 64 |
-
|
| 65 |
-
|
| 66 |
-
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
}
|
|
|
|
| 1 |
{
|
| 2 |
+
"未命名对话历史记录": "Unnamed Dialog History",
|
| 3 |
+
"在这里输入": "Type in here",
|
| 4 |
+
"🧹 新的对话": "🧹 New Dialogue",
|
| 5 |
+
"🔄 重新生成": "🔄 Regeneration",
|
| 6 |
+
"🗑️ 删除最旧对话": "🗑️ Delete oldest dialog",
|
| 7 |
+
"🗑️ 删除最新对话": "🗑️ Delete latest dialog",
|
| 8 |
+
"模型": "Model",
|
| 9 |
+
"多账号模式已开启,无需输入key,可直接开始对话": "Multi-account mode is enabled, no need to enter key, you can start the dialogue directly",
|
| 10 |
+
"**发送消息** 或 **提交key** 以显示额度": "**Send message** or **Submit key** to display credit",
|
| 11 |
+
"选择模型": "Select Model",
|
| 12 |
+
"选择LoRA模型": "Select LoRA Model",
|
| 13 |
+
"实时传输回答": "Stream output",
|
| 14 |
+
"单轮对话": "Single-turn dialogue",
|
| 15 |
+
"使用在线搜索": "Use online search",
|
| 16 |
+
"选择回复语言(针对搜索&索引功能)": "Select reply language (for search & index)",
|
| 17 |
+
"上传索引文件": "Upload",
|
| 18 |
+
"双栏pdf": "Two-column pdf",
|
| 19 |
+
"识别公式": "formula OCR",
|
| 20 |
+
"在这里输入System Prompt...": "Type in System Prompt here...",
|
| 21 |
+
"加载Prompt模板": "Load Prompt Template",
|
| 22 |
+
"选择Prompt模板集合文件": "Select Prompt Template Collection File",
|
| 23 |
+
"🔄 刷新": "🔄 Refresh",
|
| 24 |
+
"从Prompt模板中加载": "Load from Prompt Template",
|
| 25 |
+
"保存/加载": "Save/Load",
|
| 26 |
+
"保存/加载对话历史记录": "Save/Load Dialog History",
|
| 27 |
+
"从列表中加载对话": "Load dialog from list",
|
| 28 |
+
"设置文件名: 默认为.json,可选为.md": "Set file name: default is .json, optional is .md",
|
| 29 |
+
"设置保存文件名": "Set save file name",
|
| 30 |
+
"对话历史记录": "Dialog History",
|
| 31 |
+
"💾 保存对话": "💾 Save Dialog",
|
| 32 |
+
"📝 导出为Markdown": "📝 Export as Markdown",
|
| 33 |
+
"默认保存于history文件夹": "Default save in history folder",
|
| 34 |
+
"高级": "Advanced",
|
| 35 |
+
"# ⚠️ 务必谨慎更改 ⚠️\n\n如果无法使用请恢复默认设置": "# ⚠️ Caution: Changes require care. ⚠️\n\nIf unable to use, restore default settings.",
|
| 36 |
+
"参数": "Parameters",
|
| 37 |
+
"在这里输入停止符,用英文逗号隔开...": "Type in stop token here, separated by comma...",
|
| 38 |
+
"用于定位滥用行为": "Used to locate abuse",
|
| 39 |
+
"用户名": "Username",
|
| 40 |
+
"网络设置": "Network Settings",
|
| 41 |
+
"在这里输入API-Host...": "Type in API-Host here...",
|
| 42 |
+
"🔄 切换API地址": "🔄 Switch API Address",
|
| 43 |
+
"在这里输入代理地址...": "Type in proxy address here...",
|
| 44 |
+
"代理地址(示例:http://127.0.0.1:10809)": "Proxy address (example: http://127.0.0.1:10809)",
|
| 45 |
+
"🔄 设置代理地址": "🔄 Set Proxy Address",
|
| 46 |
+
"🔙 恢复默认设置": "🔙 Restore Default Settings",
|
| 47 |
+
"智能对话机器人 🚀": "智能对话机器儿 🚀",
|
| 48 |
+
"开始实时传输回答……": "Start streaming output...",
|
| 49 |
+
"Token 计数: ": "Token Count: ",
|
| 50 |
+
",本次对话累计消耗了 ": ",Total cost for this dialogue is ",
|
| 51 |
+
"**获取API使用情况失败**": "**Failed to get API usage**",
|
| 52 |
+
"**本月使用金额** ": "**Monthly usage** ",
|
| 53 |
+
"获取API使用情况失败:": "Failed to get API usage:",
|
| 54 |
+
"API密钥更改为了": "The API key is changed to",
|
| 55 |
+
"JSON解析错误,收到的内容: ": "JSON parsing error, received content: ",
|
| 56 |
+
"模型设置为了:": "Model is set to: ",
|
| 57 |
+
"☹️发生了错误:": "☹️Error: ",
|
| 58 |
+
"获取对话时发生错误,请查看后台日志": "Error occurred when getting dialogue, check the background log",
|
| 59 |
+
"请检查网络连接,或者API-Key是否有效。": "Check the network connection or whether the API-Key is valid.",
|
| 60 |
+
"连接超时,无法获取对话。": "Connection timed out, unable to get dialogue.",
|
| 61 |
+
"读取超时,无法获取对话。": "Read timed out, unable to get dialogue.",
|
| 62 |
+
"代理错误,无法获取对话。": "Proxy error, unable to get dialogue.",
|
| 63 |
+
"SSL错误,无法获取对话。": "SSL error, unable to get dialogue.",
|
| 64 |
+
"API key为空,请检查是否输入正确。": "API key is empty, check whether it is entered correctly.",
|
| 65 |
+
"请输入对话内容。": "Enter the content of the conversation.",
|
| 66 |
+
"账单信息不适用": "Billing information is not applicable",
|
| 67 |
+
"由Bilibili [土川虎虎虎](https://space.bilibili.com/29125536) 和 [明昭MZhao](https://space.bilibili.com/24807452)开发<br />访问川虎Chat的 [GitHub项目](https://github.com/GaiZhenbiao/ChuanhuChatGPT) 下载最新版脚本": "developor: Bilibili [土川虎虎虎](https://space.bilibili.com/29125536) and [明昭MZhao](https://space.bilibili.com/24807452)\n\nDownload latest code from [GitHub](https://github.com/GaiZhenbiao/ChuanhuChatGPT)",
|
| 68 |
+
"切换亮暗色主题": "Switch light/dark theme",
|
| 69 |
+
"您的IP区域:未知。": "Your IP region: Unknown.",
|
| 70 |
+
"获取IP地理位置失败。原因:": "Failed to get IP location. Reason: ",
|
| 71 |
+
"。你仍然可以使用聊天功能。": ". You can still use the chat function.",
|
| 72 |
+
"您的IP区域:": "Your IP region: "
|
| 73 |
}
|
modules/presets.py
CHANGED
|
@@ -5,6 +5,7 @@ import gradio as gr
|
|
| 5 |
from .webui_locale import I18nAuto
|
| 6 |
|
| 7 |
i18n = I18nAuto() # internationalization
|
|
|
|
| 8 |
|
| 9 |
CHATGLM_MODEL = None
|
| 10 |
CHATGLM_TOKENIZER = None
|
|
@@ -42,9 +43,9 @@ CONCURRENT_COUNT = 100 # 允许同时使用的用户数量
|
|
| 42 |
SIM_K = 5
|
| 43 |
INDEX_QUERY_TEMPRATURE = 1.0
|
| 44 |
|
| 45 |
-
CHUANHU_TITLE = i18n("
|
| 46 |
|
| 47 |
-
CHUANHU_DESCRIPTION = i18n("由Bilibili [土川虎虎虎](https://space.bilibili.com/29125536)、[明昭MZhao](https://space.bilibili.com/24807452) 和 [Keldos](https://github.com/Keldos-Li) 开发<br />访问川虎Chat的 [GitHub项目](https://github.com/GaiZhenbiao/ChuanhuChatGPT) 下载最新版脚本")
|
| 48 |
|
| 49 |
|
| 50 |
ONLINE_MODELS = [
|
|
|
|
| 5 |
from .webui_locale import I18nAuto
|
| 6 |
|
| 7 |
i18n = I18nAuto() # internationalization
|
| 8 |
+
i18n.set_language("zh_CN") # set language to Chinese
|
| 9 |
|
| 10 |
CHATGLM_MODEL = None
|
| 11 |
CHATGLM_TOKENIZER = None
|
|
|
|
| 43 |
SIM_K = 5
|
| 44 |
INDEX_QUERY_TEMPRATURE = 1.0
|
| 45 |
|
| 46 |
+
CHUANHU_TITLE = i18n("智能对话机器人 🚀")
|
| 47 |
|
| 48 |
+
# CHUANHU_DESCRIPTION = i18n("由Bilibili [土川虎虎虎](https://space.bilibili.com/29125536)、[明昭MZhao](https://space.bilibili.com/24807452) 和 [Keldos](https://github.com/Keldos-Li) 开发<br />访问川虎Chat的 [GitHub项目](https://github.com/GaiZhenbiao/ChuanhuChatGPT) 下载最新版脚本")
|
| 49 |
|
| 50 |
|
| 51 |
ONLINE_MODELS = [
|