Spaces:
Running
on
T4
Running
on
T4
ffreemt
commited on
Commit
·
f5c4b5c
1
Parent(s):
558796e
Update model.generation_config.update
Browse files
app.py
CHANGED
@@ -118,7 +118,7 @@ def bot(chat_history, **kwargs):
|
|
118 |
)
|
119 |
"""
|
120 |
logger.debug("run model.chat...")
|
121 |
-
model.generation_config(**kwargs)
|
122 |
response, chat_history = model.chat(
|
123 |
tokenizer,
|
124 |
message,
|
@@ -141,7 +141,7 @@ def bot_stream(chat_history, **kwargs):
|
|
141 |
# yield chat_history
|
142 |
|
143 |
# for elm in model.chat_stream(tokenizer, message, chat_history):
|
144 |
-
model.generation_config(**kwargs)
|
145 |
for elm in model.chat_stream(tokenizer, message, chat_history):
|
146 |
chat_history[-1] = [message, elm]
|
147 |
yield chat_history
|
|
|
118 |
)
|
119 |
"""
|
120 |
logger.debug("run model.chat...")
|
121 |
+
model.generation_config.update(**kwargs)
|
122 |
response, chat_history = model.chat(
|
123 |
tokenizer,
|
124 |
message,
|
|
|
141 |
# yield chat_history
|
142 |
|
143 |
# for elm in model.chat_stream(tokenizer, message, chat_history):
|
144 |
+
model.generation_config.update(**kwargs)
|
145 |
for elm in model.chat_stream(tokenizer, message, chat_history):
|
146 |
chat_history[-1] = [message, elm]
|
147 |
yield chat_history
|