Kajise Org commited on
Commit
5d6831b
1 Parent(s): e7f4482

Update parsing of data and prompt.

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -11,7 +11,8 @@ hf_hub_download(repo_id="LLukas22/gpt4all-lora-quantized-ggjt", filename="ggjt-m
11
  llm = Llama(model_path="./ggjt-model.bin")
12
 
13
  ins = '''### Instruction:
14
- {}
 
15
  ### Response:
16
  '''
17
 
@@ -52,10 +53,9 @@ def search_ddg(question: str):
52
  return output_string
53
 
54
  def generate(instruction):
55
- base_prompt = ins.format(instruction)
56
  feeding_data = search_ddg("What is KOIT-FM?")
57
 
58
- response = llm(ins.format(base_prompt + "\n" + feeding_data), stop=['### Instruction:', '### End'])
59
  result = response['choices'][0]['text']
60
  return result
61
 
 
11
  llm = Llama(model_path="./ggjt-model.bin")
12
 
13
  ins = '''### Instruction:
14
+ {question}
15
+ {data}
16
  ### Response:
17
  '''
18
 
 
53
  return output_string
54
 
55
  def generate(instruction):
 
56
  feeding_data = search_ddg("What is KOIT-FM?")
57
 
58
+ response = llm(ins.format(question=base_prompt, data=feeding_data), stop=['### Instruction:', '### End'])
59
  result = response['choices'][0]['text']
60
  return result
61