Spaces:
Sleeping
Sleeping
Pclanglais
commited on
Commit
•
14d88d8
1
Parent(s):
9e6c9ac
Update app.py
Browse files
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 |
-
|
149 |
for new_token in streamer:
|
150 |
if new_token != '<':
|
151 |
-
|
152 |
-
yield
|
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
|