Pclanglais commited on
Commit
14d88d8
1 Parent(s): 9e6c9ac

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -145,12 +145,11 @@ def predict(history_transformer_format):
145
  t = Thread(target=model.generate, kwargs=generate_kwargs)
146
  t.start()
147
 
148
- partial_message = ""
149
  for new_token in streamer:
150
  if new_token != '<':
151
- partial_message += new_token
152
- yield partial_message
153
- return messages
154
 
155
  def user(message, history):
156
  global source_text
 
145
  t = Thread(target=model.generate, kwargs=generate_kwargs)
146
  t.start()
147
 
148
+ history_transformer_format[-1][1] = ""
149
  for new_token in streamer:
150
  if new_token != '<':
151
+ history_transformer_format[-1][1] += character
152
+ yield history_transformer_format
 
153
 
154
  def user(message, history):
155
  global source_text