zac commited on
Commit
ce356a3
·
1 Parent(s): 793eafb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,10 +18,10 @@ def generate_text(input_text, history):
18
  else:
19
  input_text_with_history = history[-1][1]+ "\n"
20
  input_text_with_history += f"Q: {input_text} \n A:"
21
-
22
  print("new input", input_text_with_history)
23
  output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], echo=True)
24
  response = output['choices'][0]['text'] + "\n"
 
25
  return response
26
 
27
 
 
18
  else:
19
  input_text_with_history = history[-1][1]+ "\n"
20
  input_text_with_history += f"Q: {input_text} \n A:"
 
21
  print("new input", input_text_with_history)
22
  output = llm(input_text_with_history, max_tokens=1024, stop=["Q:", "\n"], echo=True)
23
  response = output['choices'][0]['text'] + "\n"
24
+ history =["init",input_text_with_history]
25
  return response
26
 
27