Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|