MZhaovo commited on
Commit
30b4af2
1 Parent(s): b8f3115

优化sl以及prompt样式

Browse files
Files changed (1) hide show
  1. ChuanhuChatbot.py +12 -11
ChuanhuChatbot.py CHANGED
@@ -125,6 +125,7 @@ with gr.Blocks(css=customCSS) as demo:
125
  placeholder=f"在这里输入System Prompt...",
126
  label="System prompt",
127
  value=initial_prompt,
 
128
  ).style(container=True)
129
  with gr.Accordion(label="加载Prompt模板", open=True):
130
  with gr.Column():
@@ -153,8 +154,17 @@ with gr.Blocks(css=customCSS) as demo:
153
 
154
  with gr.Tab(label="保存/加载"):
155
  with gr.Accordion(label="保存/加载对话历史记录", open=True):
156
- gr.Markdown("对话历史默认保存在history文件夹中。")
157
  with gr.Column():
 
 
 
 
 
 
 
 
 
 
158
  with gr.Row():
159
  with gr.Column(scale=6):
160
  saveFileName = gr.Textbox(
@@ -166,16 +176,7 @@ with gr.Blocks(css=customCSS) as demo:
166
  with gr.Column(scale=1):
167
  saveHistoryBtn = gr.Button("💾 保存对话")
168
  exportMarkdownBtn = gr.Button("📝 导出为Markdown")
169
- with gr.Row():
170
- with gr.Column(scale=6):
171
- historyFileSelectDropdown = gr.Dropdown(
172
- label="从列表中加载对话",
173
- choices=get_history_names(plain=True),
174
- multiselect=False,
175
- value=get_history_names(plain=True)[0],
176
- )
177
- with gr.Column(scale=1):
178
- historyRefreshBtn = gr.Button("🔄 刷新")
179
  with gr.Row():
180
  with gr.Column():
181
  downloadFile = gr.File(interactive=True)
 
125
  placeholder=f"在这里输入System Prompt...",
126
  label="System prompt",
127
  value=initial_prompt,
128
+ lines=10,
129
  ).style(container=True)
130
  with gr.Accordion(label="加载Prompt模板", open=True):
131
  with gr.Column():
 
154
 
155
  with gr.Tab(label="保存/加载"):
156
  with gr.Accordion(label="保存/加载对话历史记录", open=True):
 
157
  with gr.Column():
158
+ with gr.Row():
159
+ with gr.Column(scale=6):
160
+ historyFileSelectDropdown = gr.Dropdown(
161
+ label="从列表中加载对话",
162
+ choices=get_history_names(plain=True),
163
+ multiselect=False,
164
+ value=get_history_names(plain=True)[0],
165
+ )
166
+ with gr.Column(scale=1):
167
+ historyRefreshBtn = gr.Button("🔄 刷新")
168
  with gr.Row():
169
  with gr.Column(scale=6):
170
  saveFileName = gr.Textbox(
 
176
  with gr.Column(scale=1):
177
  saveHistoryBtn = gr.Button("💾 保存对话")
178
  exportMarkdownBtn = gr.Button("📝 导出为Markdown")
179
+ gr.Markdown("默认保存于history文件夹")
 
 
 
 
 
 
 
 
 
180
  with gr.Row():
181
  with gr.Column():
182
  downloadFile = gr.File(interactive=True)