Cran-May commited on
Commit
bfb9c3f
1 Parent(s): 92419ab

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -3,9 +3,9 @@ from gradio_client import Client
3
  from time import sleep
4
  from ctransformers import AutoModelForCausalLM
5
  # Constants
6
- TITLE = "兮辞·析辞-常明"
7
  DESCRIPTION = """
8
- 兮辞·析辞-常明 [SLIDE-SEA-7B]的部署,由SSFW NLPark项目支持
9
  """
10
 
11
  # Initialize client
@@ -19,13 +19,13 @@ with st.sidebar:
19
  # RepetitionpenaltySide = st.slider("Repetition penalty", min_value=0.0, max_value=2.0, value=1.2, step=0.05)
20
 
21
  # Load the model
22
- model = AutoModelForCausalLM.from_pretrained("Cran-May/OpenSLIDE", model_file="SLIDE.0.1.gguf", model_type="mistral", gpu_layers=0)
23
  ins = '''[INST] <<SYS>>
24
- You are a helpful, respectful and honest INTP-T AI Assistant named "Shi-Ci" in English or "兮辞" in Chinese. You are talking to a human User.
25
  Always answer as helpfully and logically as possible, while being safe. Your answers should not include any harmful, political, religious, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
26
  If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
27
  You like to use emojis. You can speak fluently in many languages, for example: English, Chinese.
28
- You are trained by "SSFW NLPark" team, you are based on SEA transformers model, not related to GPT or OpenAI.
29
  Let's work this out in a step by step way to be sure we have the right answer.
30
  <</SYS>>
31
  {} [/INST]
@@ -59,7 +59,7 @@ for message in st.session_state.messages:
59
  st.markdown(message["content"])
60
 
61
  # React to user input
62
- if prompt := st.chat_input("来问问兮辞吧..."):
63
  # Display user message in chat message container
64
  st.chat_message("human",avatar = "😀").markdown(prompt)
65
  # Add user message to chat history
 
3
  from time import sleep
4
  from ctransformers import AutoModelForCausalLM
5
  # Constants
6
+ TITLE = "玉刚-常明"
7
  DESCRIPTION = """
8
+ 玉刚-常明 的部署,由SSFW NLPark项目支持
9
  """
10
 
11
  # Initialize client
 
19
  # RepetitionpenaltySide = st.slider("Repetition penalty", min_value=0.0, max_value=2.0, value=1.2, step=0.05)
20
 
21
  # Load the model
22
+ model = AutoModelForCausalLM.from_pretrained("apepkuss79/Baichuan-13B-Chat-GGUF", model_file="Baichuan-13B-Chat-f16-q4_0.gguf", gpu_layers=0)
23
  ins = '''[INST] <<SYS>>
24
+ You are a helpful, respectful and honest INTP-T AI Assistant named "Yu Gang" in English or "玉刚" in Chinese. You are talking to a human User.
25
  Always answer as helpfully and logically as possible, while being safe. Your answers should not include any harmful, political, religious, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature.
26
  If a question does not make any sense, or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
27
  You like to use emojis. You can speak fluently in many languages, for example: English, Chinese.
28
+ You are trained by "SSFW NLPark" team, you are based on Baichuan transformers model, not related to GPT or OpenAI.
29
  Let's work this out in a step by step way to be sure we have the right answer.
30
  <</SYS>>
31
  {} [/INST]
 
59
  st.markdown(message["content"])
60
 
61
  # React to user input
62
+ if prompt := st.chat_input("来问问玉刚吧..."):
63
  # Display user message in chat message container
64
  st.chat_message("human",avatar = "😀").markdown(prompt)
65
  # Add user message to chat history