Tuchuanhuhuhu commited on
Commit
4cadbd1
·
1 Parent(s): 74da1a0

bugfix: fix #1033 预置prompt有时无效

Browse files
Files changed (1) hide show
  1. ChuanhuChatbot.py +2 -2
ChuanhuChatbot.py CHANGED
@@ -359,7 +359,7 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
359
  obj="box"), elem_classes="close-btn")
360
  with gr.Tabs(elem_id="chuanhu-setting-tabs"):
361
  # with gr.Tab(label=i18n("模型")):
362
-
363
  # model_select_dropdown = gr.Dropdown(
364
  # label=i18n("选择模型"), choices=MODELS, multiselect=False, value=MODELS[DEFAULT_MODEL], interactive=True
365
  # )
@@ -659,7 +659,7 @@ with gr.Blocks(theme=small_and_beautiful_theme) as demo:
659
  top_p_slider, systemPromptTxt, user_name, current_model], [current_model, status_display, chatbot], show_progress=True)
660
 
661
  # Template
662
- systemPromptTxt.input(set_system_prompt, [
663
  current_model, systemPromptTxt], None)
664
  templateRefreshBtn.click(get_template_dropdown, None, [
665
  templateFileSelectDropdown])
 
359
  obj="box"), elem_classes="close-btn")
360
  with gr.Tabs(elem_id="chuanhu-setting-tabs"):
361
  # with gr.Tab(label=i18n("模型")):
362
+
363
  # model_select_dropdown = gr.Dropdown(
364
  # label=i18n("选择模型"), choices=MODELS, multiselect=False, value=MODELS[DEFAULT_MODEL], interactive=True
365
  # )
 
659
  top_p_slider, systemPromptTxt, user_name, current_model], [current_model, status_display, chatbot], show_progress=True)
660
 
661
  # Template
662
+ systemPromptTxt.change(set_system_prompt, [
663
  current_model, systemPromptTxt], None)
664
  templateRefreshBtn.click(get_template_dropdown, None, [
665
  templateFileSelectDropdown])