NCTCMumbai commited on
Commit
79729be
1 Parent(s): bef07a7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -166,11 +166,11 @@ def bot(history, cross_encoder):
166
  new_history[-1] = (prompt, output) #query replaced with prompt
167
  print('New History',new_history)
168
  #print('prompt html',prompt_html)# Update the last tuple with new text
169
- for character in generate_fn(prompt, history[:-1]):
170
- history_list = list(history[-1])
171
- history_list[1] = character # Assuming `character` is what you want to assign
172
- # Update the history with the modified list converted back to a tuple
173
- history[-1] = tuple(history_list)
174
 
175
  #history[-1][1] = character
176
  # yield new_history, prompt_html
 
166
  new_history[-1] = (prompt, output) #query replaced with prompt
167
  print('New History',new_history)
168
  #print('prompt html',prompt_html)# Update the last tuple with new text
169
+
170
+ history_list = list(history[-1])
171
+ history_list[1] = output # Assuming `character` is what you want to assign
172
+ # Update the history with the modified list converted back to a tuple
173
+ history[-1] = tuple(history_list)
174
 
175
  #history[-1][1] = character
176
  # yield new_history, prompt_html