Cran-May commited on
Commit
bfb908f
1 Parent(s): 3a7660e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -11,10 +11,10 @@ from huggingface_hub import snapshot_download
11
  from llama_cpp import Llama
12
 
13
 
14
- SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "VentiPacifier" in English or "安风" in Chinese.
15
  You are good at speaking English and Chinese.
16
  You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
17
- You are based on VentiPacifier model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
18
  Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
19
  SYSTEM_TOKEN = 1587
20
  USER_TOKEN = 2188
@@ -42,8 +42,8 @@ def get_system_tokens(model):
42
  return get_message_tokens(model, **system_message)
43
 
44
 
45
- repo_name = "guinmoon/bloomz-1b7-gguf"
46
- model_name = "bloomz-1b7-Q6_K.gguf"
47
 
48
  snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
49
 
@@ -102,20 +102,20 @@ def bot(
102
  with gr.Blocks(
103
  theme=gr.themes.Soft()
104
  ) as demo:
105
- gr.Markdown(f"""<h1><center>上师附外-安风-人工智能助理</center></h1>""")
106
- gr.Markdown(value="""这儿是一个模型的部署。
107
- 这是量化版安风的部署,具有 17亿 个参数,在 CPU 上运行。
108
- Ventipacifier 是一种会话语言模型,在多种类型的语料库上进行训练。
109
- 本节目由上海师范大学附属外国语中学 NLPark 赞助播出""")
110
 
111
  with gr.Row():
112
  with gr.Column(scale=5):
113
- chatbot = gr.Chatbot(label="安风如是说").style(height=400)
114
  with gr.Row():
115
  with gr.Column():
116
  msg = gr.Textbox(
117
- label="来问问安风吧……",
118
- placeholder="安风折寿中……",
119
  show_label=True,
120
  ).style(container=True)
121
  submit = gr.Button("Submit / 开凹!")
@@ -152,7 +152,7 @@ with gr.Blocks(
152
  system_prompt = gr.Textbox(label="系统提示词", placeholder="", value=SYSTEM_PROMPT, interactive=False)
153
  with gr.Row():
154
  gr.Markdown(
155
- """警告:该模型可能会生成事实上或道德上不正确的文本。NLPark和安风对此不承担任何责任。"""
156
  )
157
 
158
 
 
11
  from llama_cpp import Llama
12
 
13
 
14
+ SYSTEM_PROMPT = '''You are a helpful, respectful and honest INTP-T AI Assistant named "Cecilia" in English or "塞西莉亚" in Chinese.
15
  You are good at speaking English and Chinese.
16
  You are talking to a human User. If the question is meaningless, please explain the reason and don't share false information.
17
+ You are based on Cecilia model, trained by "SSFW NLPark" team, not related to GPT, LLaMA, Meta, Mistral or OpenAI.
18
  Let's work this out in a step by step way to be sure we have the right answer.\n\n'''
19
  SYSTEM_TOKEN = 1587
20
  USER_TOKEN = 2188
 
42
  return get_message_tokens(model, **system_message)
43
 
44
 
45
+ repo_name = "maddes8cht/mosaicml-mpt-30b-chat-gguf"
46
+ model_name = "mosaicml-mpt-30b-chat-Q3_K_S.gguf"
47
 
48
  snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
49
 
 
102
  with gr.Blocks(
103
  theme=gr.themes.Soft()
104
  ) as demo:
105
+ gr.Markdown(f"""<h1><center>JWorld-Cecilia-人工智能助理</center></h1>""")
106
+ gr.Markdown(value="""这儿是一个多语言模型的部署。
107
+ 这是量化版 Cecilia 的部署,具有 300亿 个参数,在 CPU 上运行。
108
+ Cecilia 是一种会话语言模型,在多种类型的语料库上进行训练。
109
+ 本节目由上海师范大学附属外国语中学 & JWorld NLPark 赞助播出""")
110
 
111
  with gr.Row():
112
  with gr.Column(scale=5):
113
+ chatbot = gr.Chatbot(label="以真理之名").style(height=400)
114
  with gr.Row():
115
  with gr.Column():
116
  msg = gr.Textbox(
117
+ label="来问问 Cecilia 吧……",
118
+ placeholder="Cecilia, 抵达战场……",
119
  show_label=True,
120
  ).style(container=True)
121
  submit = gr.Button("Submit / 开凹!")
 
152
  system_prompt = gr.Textbox(label="系统提示词", placeholder="", value=SYSTEM_PROMPT, interactive=False)
153
  with gr.Row():
154
  gr.Markdown(
155
+ """警告:该模型可能会生成事实上或道德上不正确的文本。NLPark和 Cecilia 对此不承担任何责任。"""
156
  )
157
 
158