update webui.py
This commit is contained in:
parent
9fc467274f
commit
8b1c5bcf9e
20
webui.py
20
webui.py
|
|
@ -9,7 +9,6 @@ from webui_pages.utils import *
|
||||||
from streamlit_option_menu import option_menu
|
from streamlit_option_menu import option_menu
|
||||||
from webui_pages import *
|
from webui_pages import *
|
||||||
|
|
||||||
|
|
||||||
api = ApiRequest(base_url="http://127.0.0.1:7861", no_remote_api=False)
|
api = ApiRequest(base_url="http://127.0.0.1:7861", no_remote_api=False)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
|
|
@ -19,18 +18,21 @@ if __name__ == "__main__":
|
||||||
st.set_page_config("langchain-chatglm WebUI")
|
st.set_page_config("langchain-chatglm WebUI")
|
||||||
|
|
||||||
if not chat_box.chat_inited:
|
if not chat_box.chat_inited:
|
||||||
st.toast(f"欢迎使用 [`Langchain-Chatglm`](https://github.com/chatchat-space/langchain-chatglm) ! \n\n当前使用模型`{LLM_MODEL}`, 您可以开始提问了.")
|
st.toast(
|
||||||
|
f"欢迎使用 [`Langchain-Chatglm`](https://github.com/chatchat-space/langchain-chatglm) ! \n\n"
|
||||||
|
f"当前使用模型`{LLM_MODEL}`, 您可以开始提问了."
|
||||||
|
)
|
||||||
st.toast(" ")
|
st.toast(" ")
|
||||||
|
|
||||||
pages = {"对话": {"icon": "chat",
|
pages = {"对话": {"icon": "chat",
|
||||||
"func": dialogue_page,
|
"func": dialogue_page,
|
||||||
},
|
},
|
||||||
"知识库管理": {"icon": "hdd-stack",
|
"知识库管理": {"icon": "hdd-stack",
|
||||||
"func": knowledge_base_page,
|
"func": knowledge_base_page,
|
||||||
},
|
},
|
||||||
"模型配置": {"icon": "gear",
|
# "模型配置": {"icon": "gear",
|
||||||
"func": model_config_page,
|
# "func": model_config_page,
|
||||||
}
|
# }
|
||||||
}
|
}
|
||||||
|
|
||||||
with st.sidebar:
|
with st.sidebar:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue