winglian commited on
Commit
776e6fd
1 Parent(s): 3143561

more fixes to config file based llama

Browse files
Files changed (1) hide show
  1. instruct.py +1 -1
instruct.py CHANGED
@@ -12,7 +12,7 @@ fp = hf_hub_download(
12
  llm = Llama(model_path=fp)
13
 
14
  def generate_text(input_text):
15
- output = llm(f"### Instruction: {input_text}\n\n### Response: ", stop=["</s>", "<unk>", "### Instruction:"], echo=True, **config['chat'])
16
  return output['choices'][0]['text']
17
 
18
  input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")
 
12
  llm = Llama(model_path=fp)
13
 
14
  def generate_text(input_text):
15
+ output = llm(f"### Instruction: {input_text}\n\n### Response: ", echo=False, **config['chat'])
16
  return output['choices'][0]['text']
17
 
18
  input_text = gr.inputs.Textbox(lines= 10, label="Enter your input text")