zac commited on
Commit
c6dc2c7
·
1 Parent(s): a774ad4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -11,6 +11,7 @@ llm = Llama(model_path= hf_hub_download(repo_id="TheBloke/airoboros-l2-13b-gpt4-
11
  history = ""
12
 
13
  def generate_text(input_text, history):
 
14
  full_conversation = f"{history} Q: {input_text} \n A:"
15
  output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
16
  response = output['choices'][0]['text']
 
11
  history = ""
12
 
13
  def generate_text(input_text, history):
14
+ history = history[-1]
15
  full_conversation = f"{history} Q: {input_text} \n A:"
16
  output = llm(full_conversation, max_tokens=1024, stop=["Q:", "\n"], echo=True)
17
  response = output['choices'][0]['text']