thomas-yanxin
commited on
Commit
•
6df6fa2
1
Parent(s):
dc18ab0
update
Browse files- app.py +5 -5
- requirements.txt +2 -2
app.py
CHANGED
@@ -25,6 +25,7 @@ embedding_model_dict = {
|
|
25 |
}
|
26 |
|
27 |
llm_model_dict = {
|
|
|
28 |
"ChatGLM-6B-int4": "THUDM/chatglm-6b-int4",
|
29 |
"ChatGLM-6b-int4-qe": "THUDM/chatglm-6b-int4-qe",
|
30 |
"Minimax": "Minimax"
|
@@ -223,7 +224,7 @@ if __name__ == "__main__":
|
|
223 |
|
224 |
|
225 |
with gr.Column(scale=4):
|
226 |
-
chatbot = gr.Chatbot(label='ChatLLM').style(height=
|
227 |
message = gr.Textbox(label='请输入问题')
|
228 |
state = gr.State()
|
229 |
|
@@ -252,9 +253,8 @@ if __name__ == "__main__":
|
|
252 |
],
|
253 |
outputs=[message, chatbot, state])
|
254 |
gr.Markdown("""提醒:<br>
|
255 |
-
1.
|
256 |
-
2.
|
257 |
-
3.
|
258 |
-
4. 有任何使用问题,请通过[问题交流区](https://modelscope.cn/studios/thomas/ChatYuan-test/comment)或[Github Issue区](https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui/issues)进行反馈. <br>
|
259 |
""")
|
260 |
demo.queue().launch(server_name='0.0.0.0', share=False)
|
|
|
25 |
}
|
26 |
|
27 |
llm_model_dict = {
|
28 |
+
"ChatGLM-6B-int8": "THUDM/chatglm-6b-int8",
|
29 |
"ChatGLM-6B-int4": "THUDM/chatglm-6b-int4",
|
30 |
"ChatGLM-6b-int4-qe": "THUDM/chatglm-6b-int4-qe",
|
31 |
"Minimax": "Minimax"
|
|
|
224 |
|
225 |
|
226 |
with gr.Column(scale=4):
|
227 |
+
chatbot = gr.Chatbot(label='ChatLLM').style(height=600)
|
228 |
message = gr.Textbox(label='请输入问题')
|
229 |
state = gr.State()
|
230 |
|
|
|
253 |
],
|
254 |
outputs=[message, chatbot, state])
|
255 |
gr.Markdown("""提醒:<br>
|
256 |
+
1. 使用时请先上传自己的知识文件,并且文件中不含某些特殊字符,否则将返回error. <br>
|
257 |
+
2. 请勿上传或输入敏感内容,否则输出内容将被平台拦截返回error.<br>
|
258 |
+
3. 有任何使用问题,请通过[问题交流区](https://modelscope.cn/studios/thomas/ChatYuan-test/comment)或[Github Issue区](https://github.com/thomas-yanxin/LangChain-ChatGLM-Webui/issues)进行反馈. <br>
|
|
|
259 |
""")
|
260 |
demo.queue().launch(server_name='0.0.0.0', share=False)
|
requirements.txt
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
torch
|
2 |
langchain
|
3 |
accelerate
|
4 |
duckduckgo_search
|
@@ -14,4 +14,4 @@ faiss-cpu
|
|
14 |
gradio
|
15 |
nltk
|
16 |
accelerate
|
17 |
-
|
|
|
1 |
+
torch==1.12.0
|
2 |
langchain
|
3 |
accelerate
|
4 |
duckduckgo_search
|
|
|
14 |
gradio
|
15 |
nltk
|
16 |
accelerate
|
17 |
+
detectron2@git+https://github.com/facebookresearch/detectron2.git@v0.6#egg=detectron2
|