Update app.py
Browse files
app.py
CHANGED
@@ -16,10 +16,14 @@ def CustomChatGPT(user_input):
|
|
16 |
ChatGPT_reply = response["choices"][0]["message"]["content"]
|
17 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
18 |
return ChatGPT_reply
|
19 |
-
|
|
|
|
|
|
|
20 |
demo = gr.Interface(fn=CustomChatGPT,
|
21 |
-
description =
|
22 |
-
title =
|
|
|
23 |
inputs=gr.inputs.Textbox(label="Question"), outputs=gr.outputs.Textbox(label="Answer"), title = "I am Stephane AI and my name is Cameron")
|
24 |
|
25 |
demo.launch()
|
|
|
16 |
ChatGPT_reply = response["choices"][0]["message"]["content"]
|
17 |
messages.append({"role": "assistant", "content": ChatGPT_reply})
|
18 |
return ChatGPT_reply
|
19 |
+
|
20 |
+
description = "This is an unofficial chatbot application based on open source model ChatGLM-6B(https://github.com/THUDM/ChatGLM-6B), running on cpu(therefore max_length is limited to 512). \nIf you want to use this chat bot in your space, 'Duplicate this space' by click the button close to 'Linked Models'. \n"
|
21 |
+
title = "ChatGLM-6B Chatbot"
|
22 |
+
examples = [["Hello?"], ["你好。"], ["介绍清华"]]
|
23 |
demo = gr.Interface(fn=CustomChatGPT,
|
24 |
+
description = description,
|
25 |
+
title = title,
|
26 |
+
examples=examples,
|
27 |
inputs=gr.inputs.Textbox(label="Question"), outputs=gr.outputs.Textbox(label="Answer"), title = "I am Stephane AI and my name is Cameron")
|
28 |
|
29 |
demo.launch()
|