Robin Genolet commited on
Commit
b424029
·
1 Parent(s): 4f4f63f

fix: reset params

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -93,7 +93,7 @@ def display_streamlit_sidebar():
93
  repetition_penalty = form.slider(label="repetition_penalty", min_value=0.0, max_value=5.0, step=0.01, value=st.session_state["repetition_penalty"])
94
 
95
  submitted = form.form_submit_button("Start session")
96
- if submitted and not st.session_state['session_started']:
97
  print('Parameters updated...')
98
  st.session_state['session_started'] = True
99
 
@@ -190,7 +190,7 @@ def get_prompt_format(model_name):
190
 
191
  '''
192
  if model_name == "TheBloke/Llama-2-7B-Chat-GPTQ":
193
- return "[INST] <<SYS>>\nYou are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.\n<</SYS>>\n{prompt}[/INST]"
194
 
195
  if model_name == "TheBloke/meditron-7B-GPTQ" or model_name == "TheBloke/meditron-70B-GPTQ":
196
  return '''<|im_start|>system
 
93
  repetition_penalty = form.slider(label="repetition_penalty", min_value=0.0, max_value=5.0, step=0.01, value=st.session_state["repetition_penalty"])
94
 
95
  submitted = form.form_submit_button("Start session")
96
+ if submitted:
97
  print('Parameters updated...')
98
  st.session_state['session_started'] = True
99
 
 
190
 
191
  '''
192
  if model_name == "TheBloke/Llama-2-7B-Chat-GPTQ":
193
+ return "[INST] <<SYS>>You are a helpful, respectful and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. 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.\n<</SYS>>\n{prompt}[/INST]"
194
 
195
  if model_name == "TheBloke/meditron-7B-GPTQ" or model_name == "TheBloke/meditron-70B-GPTQ":
196
  return '''<|im_start|>system