jykoh commited on
Commit
19d0ef9
1 Parent(s): 0fdb545

Add model outputs to chat_history

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -79,7 +79,7 @@ def generate_for_prompt(input_text, state, ret_scale_factor, max_nm_rets, num_wo
79
  response += f'<img src="/file={filename}">'
80
 
81
  # TODO(jykoh): Persist image inputs.
82
- chat_history = model_inputs + model_outputs
83
  conversation.append((input_text, response))
84
 
85
  # Set input image to None.
 
79
  response += f'<img src="/file={filename}">'
80
 
81
  # TODO(jykoh): Persist image inputs.
82
+ chat_history = model_inputs + ' '.join([s for s in model_outputs if type(s) == str]) + '\n'
83
  conversation.append((input_text, response))
84
 
85
  # Set input image to None.