Staticaliza commited on
Commit
aa862df
1 Parent(s): b7a1e36

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -63,11 +63,10 @@ def predict(instruction, history, input, preinput, access_key, model, temperatur
63
  get_result = match.group(1).strip() if match else ""
64
 
65
  history = history + [get_result]
66
- yield chat_history
67
 
68
  print(f"---\nUSER: {input}\nBOT: {get_result}\n---")
69
 
70
- return (get_result, input)
71
 
72
  def clear_history():
73
  return []
@@ -105,7 +104,7 @@ with gr.Blocks() as demo:
105
  with gr.Column():
106
  output = gr.Textbox(label = "Output", value = "", lines = 50)
107
 
108
- run.click(predict, inputs = [instruction, history, input, preinput, access_key, model, temperature, top_p, top_k, rep_p, max_tokens, stop_seqs, seed], outputs = [output, input])
109
  clear.click(clear_history, [], history)
110
  cloud.click(maintain_cloud, inputs = [], outputs = [input, output])
111
 
 
63
  get_result = match.group(1).strip() if match else ""
64
 
65
  history = history + [get_result]
 
66
 
67
  print(f"---\nUSER: {input}\nBOT: {get_result}\n---")
68
 
69
+ return (get_result, input, history)
70
 
71
  def clear_history():
72
  return []
 
104
  with gr.Column():
105
  output = gr.Textbox(label = "Output", value = "", lines = 50)
106
 
107
+ run.click(predict, inputs = [instruction, history, input, preinput, access_key, model, temperature, top_p, top_k, rep_p, max_tokens, stop_seqs, seed], outputs = [output, input, history])
108
  clear.click(clear_history, [], history)
109
  cloud.click(maintain_cloud, inputs = [], outputs = [input, output])
110