Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -36,7 +36,6 @@ def predict(message, history):
|
|
36 |
# Formatting the input for the model.
|
37 |
system_prompt = "<|im_start|>system\nYou are Phixtral, a helpful AI assistant.<|im_end|>"
|
38 |
messages = system_prompt + "".join(["".join(["\n<|im_start|>user\n" + item[0], "<|im_end|>\n<|im_start|>assistant\n" + item[1]]) for item in history_transformer_format])
|
39 |
-
print(messages)
|
40 |
input_ids = tokenizer([messages], return_tensors="pt").to('cuda')
|
41 |
streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
|
42 |
generate_kwargs = dict(
|
|
|
36 |
# Formatting the input for the model.
|
37 |
system_prompt = "<|im_start|>system\nYou are Phixtral, a helpful AI assistant.<|im_end|>"
|
38 |
messages = system_prompt + "".join(["".join(["\n<|im_start|>user\n" + item[0], "<|im_end|>\n<|im_start|>assistant\n" + item[1]]) for item in history_transformer_format])
|
|
|
39 |
input_ids = tokenizer([messages], return_tensors="pt").to('cuda')
|
40 |
streamer = TextIteratorStreamer(tokenizer, timeout=10., skip_prompt=True, skip_special_tokens=True)
|
41 |
generate_kwargs = dict(
|