mgoin commited on
Commit
9bcdb7a
1 Parent(s): 1d45f17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -89,6 +89,7 @@ with gr.Blocks(css="style.css") as demo:
89
  def generate(message, history, max_new_tokens: int, temperature: float):
90
  generation_config = {"max_new_tokens": max_new_tokens, "temperature": temperature}
91
  inference = pipe(sequences=message, streaming=True, **generation_config)
 
92
  for token in inference:
93
  history[-1][1] += token.generations[0].text
94
  yield history
 
89
  def generate(message, history, max_new_tokens: int, temperature: float):
90
  generation_config = {"max_new_tokens": max_new_tokens, "temperature": temperature}
91
  inference = pipe(sequences=message, streaming=True, **generation_config)
92
+ history[-1][1] += message
93
  for token in inference:
94
  history[-1][1] += token.generations[0].text
95
  yield history