Update app.py
Browse files
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 "
|
| 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
|
| 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 = "
|
| 46 |
-
model_name = "
|
| 47 |
|
| 48 |
snapshot_download(repo_id=repo_name, local_dir=".", allow_patterns=model_name)
|
| 49 |
|
|
@@ -102,10 +102,10 @@ def bot(
|
|
| 102 |
with gr.Blocks(
|
| 103 |
theme=gr.themes.Soft()
|
| 104 |
) as demo:
|
| 105 |
-
gr.Markdown(f"""<h1><center
|
| 106 |
-
gr.Markdown(value="""
|
| 107 |
-
|
| 108 |
-
|
| 109 |
本节目由上海师范大学附属外国语中学 NLPark 赞助播出""")
|
| 110 |
|
| 111 |
with gr.Row():
|
|
@@ -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 "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 |
return get_message_tokens(model, **system_message)
|
| 43 |
|
| 44 |
|
| 45 |
+
repo_name = "mmnga/japanese-stablelm-3b-4e1t-instruct-gguf"
|
| 46 |
+
model_name = "japanese-stablelm-3b-4e1t-instruct-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>上师附外-安风-人工智能助理</center></h1>""")
|
| 106 |
+
gr.Markdown(value="""这儿是一个模型的部署。
|
| 107 |
+
这是量化版安风的部署,具有 30亿 个参数,在 CPU 上运行。
|
| 108 |
+
Ventipacifier 是一种会话语言模型,在多种类型的语料库上进行训练。
|
| 109 |
本节目由上海师范大学附属外国语中学 NLPark 赞助播出""")
|
| 110 |
|
| 111 |
with gr.Row():
|
|
|
|
| 152 |
system_prompt = gr.Textbox(label="系统提示词", placeholder="", value=SYSTEM_PROMPT, interactive=False)
|
| 153 |
with gr.Row():
|
| 154 |
gr.Markdown(
|
| 155 |
+
"""警告:该模型可能会生成事实上或道德上不正确的文本。NLPark和安风对此不承担任何责任。"""
|
| 156 |
)
|
| 157 |
|
| 158 |
|