tiny fix and release
This commit is contained in:
parent
7c87532476
commit
ece3b3737e
|
@ -21,18 +21,18 @@ def create_chat_box(
|
|||
messages = gr.State([])
|
||||
with gr.Row():
|
||||
with gr.Column(scale=4):
|
||||
role = gr.Dropdown(choices=[Role.USER.value, Role.OBSERVATION.value], value=Role.USER.value)
|
||||
system = gr.Textbox(show_label=False)
|
||||
tools = gr.Textbox(show_label=False, lines=2)
|
||||
role = gr.Dropdown(choices=[Role.USER.value, Role.OBSERVATION.value], value=Role.USER.value)
|
||||
query = gr.Textbox(show_label=False, lines=8)
|
||||
submit_btn = gr.Button(variant="primary")
|
||||
|
||||
with gr.Column(scale=1):
|
||||
clear_btn = gr.Button()
|
||||
gen_kwargs = engine.chatter.generating_args
|
||||
max_new_tokens = gr.Slider(10, 2048, value=gen_kwargs.max_new_tokens, step=1)
|
||||
top_p = gr.Slider(0.01, 1, value=gen_kwargs.top_p, step=0.01)
|
||||
temperature = gr.Slider(0.01, 1.5, value=gen_kwargs.temperature, step=0.01)
|
||||
clear_btn = gr.Button()
|
||||
|
||||
tools.input(check_json_schema, [tools, engine.manager.get_elem_by_name("top.lang")])
|
||||
|
||||
|
@ -50,14 +50,14 @@ def create_chat_box(
|
|||
chatbot,
|
||||
messages,
|
||||
dict(
|
||||
role=role,
|
||||
system=system,
|
||||
tools=tools,
|
||||
role=role,
|
||||
query=query,
|
||||
submit_btn=submit_btn,
|
||||
clear_btn=clear_btn,
|
||||
max_new_tokens=max_new_tokens,
|
||||
top_p=top_p,
|
||||
temperature=temperature,
|
||||
clear_btn=clear_btn,
|
||||
),
|
||||
)
|
||||
|
|
|
@ -839,6 +839,17 @@ LOCALES = {
|
|||
"value": "模型未加载,请先加载模型。",
|
||||
},
|
||||
},
|
||||
"role": {
|
||||
"en": {
|
||||
"label": "Role",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Роль",
|
||||
},
|
||||
"zh": {
|
||||
"label": "角色",
|
||||
},
|
||||
},
|
||||
"system": {
|
||||
"en": {
|
||||
"placeholder": "System prompt (optional)",
|
||||
|
@ -861,17 +872,6 @@ LOCALES = {
|
|||
"placeholder": "工具列表(非必填)",
|
||||
},
|
||||
},
|
||||
"role": {
|
||||
"en": {
|
||||
"label": "Role",
|
||||
},
|
||||
"ru": {
|
||||
"label": "Роль",
|
||||
},
|
||||
"zh": {
|
||||
"label": "角色",
|
||||
},
|
||||
},
|
||||
"query": {
|
||||
"en": {
|
||||
"placeholder": "Input...",
|
||||
|
@ -894,17 +894,6 @@ LOCALES = {
|
|||
"value": "提交",
|
||||
},
|
||||
},
|
||||
"clear_btn": {
|
||||
"en": {
|
||||
"value": "Clear history",
|
||||
},
|
||||
"ru": {
|
||||
"value": "Очистить историю",
|
||||
},
|
||||
"zh": {
|
||||
"value": "清空历史",
|
||||
},
|
||||
},
|
||||
"max_length": {
|
||||
"en": {
|
||||
"label": "Maximum length",
|
||||
|
@ -949,6 +938,17 @@ LOCALES = {
|
|||
"label": "温度系数",
|
||||
},
|
||||
},
|
||||
"clear_btn": {
|
||||
"en": {
|
||||
"value": "Clear history",
|
||||
},
|
||||
"ru": {
|
||||
"value": "Очистить историю",
|
||||
},
|
||||
"zh": {
|
||||
"value": "清空历史",
|
||||
},
|
||||
},
|
||||
"max_shard_size": {
|
||||
"en": {
|
||||
"label": "Max shard size (GB)",
|
||||
|
|
Loading…
Reference in New Issue