update webui_pages/knowledge_base.py
This commit is contained in:
parent
63f0d27167
commit
f066e427ce
|
|
@ -127,10 +127,6 @@ def knowledge_base_page(api: ApiRequest):
|
|||
elif selected_kb:
|
||||
kb = selected_kb
|
||||
|
||||
with st.sidebar:
|
||||
chunk_size = st.number_input("单段文本最大长度:", 1, 1000, CHUNK_SIZE)
|
||||
chunk_overlap = st.number_input("相邻文本重合长度:", 0, 500, OVERLAP_SIZE)
|
||||
zh_title_enhance = st.checkbox("开启中文标题加强", ZH_TITLE_ENHANCE)
|
||||
|
||||
# 上传文件
|
||||
files = st.file_uploader("上传知识文件:",
|
||||
|
|
@ -138,6 +134,19 @@ def knowledge_base_page(api: ApiRequest):
|
|||
accept_multiple_files=True,
|
||||
)
|
||||
|
||||
|
||||
# with st.sidebar:
|
||||
with st.expander(
|
||||
"文件处理配置",
|
||||
expanded=True,
|
||||
):
|
||||
cols = st.columns(3)
|
||||
chunk_size = cols[0].number_input("单段文本最大长度:", 1, 1000, CHUNK_SIZE)
|
||||
chunk_overlap = cols[1].number_input("相邻文本重合长度:", 0, 500, OVERLAP_SIZE)
|
||||
cols[2].write("")
|
||||
cols[2].write("")
|
||||
zh_title_enhance = cols[2].checkbox("开启中文标题加强", ZH_TITLE_ENHANCE)
|
||||
|
||||
if st.button(
|
||||
"添加文件到知识库",
|
||||
# use_container_width=True,
|
||||
|
|
|
|||
Loading…
Reference in New Issue