Spaces:
Runtime error
Runtime error
Update fn.py
Browse files
fn.py
CHANGED
@@ -148,12 +148,12 @@ def chat(message, history = [], instruction = None, conversation_id = 'gradio',
|
|
148 |
if args['chat_template']:
|
149 |
tokenizer.chat_template = args['chat_template']
|
150 |
|
151 |
-
# tokenizeする
|
152 |
-
tokenized_chat = tokenize(message, history, instruction, conversation_id, args).to(device)
|
153 |
-
|
154 |
device = local_gemma.utils.config.infer_device(None)
|
155 |
generation_kwargs = local_gemma.utils.config.get_generation_kwargs('chat')
|
156 |
|
|
|
|
|
|
|
157 |
streamer = TextStreamer(tokenizer, skip_prompt=True, **{"skip_special_tokens": True})
|
158 |
generation_kwargs.update(
|
159 |
{
|
|
|
148 |
if args['chat_template']:
|
149 |
tokenizer.chat_template = args['chat_template']
|
150 |
|
|
|
|
|
|
|
151 |
device = local_gemma.utils.config.infer_device(None)
|
152 |
generation_kwargs = local_gemma.utils.config.get_generation_kwargs('chat')
|
153 |
|
154 |
+
# tokenizeする
|
155 |
+
tokenized_chat = tokenize(message, history, instruction, conversation_id, args).to(device)
|
156 |
+
|
157 |
streamer = TextStreamer(tokenizer, skip_prompt=True, **{"skip_special_tokens": True})
|
158 |
generation_kwargs.update(
|
159 |
{
|