Yurii Paniv
commited on
Commit
·
8ace6ee
1
Parent(s):
856636a
Add correct device
Browse files
app.py
CHANGED
@@ -56,7 +56,7 @@ def respond(
|
|
56 |
messages.append({"role": "user", "content": message})
|
57 |
|
58 |
|
59 |
-
tokenized = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True) #, tokenize=False) #
|
60 |
#print(tokenized)
|
61 |
#tokenized = tokenizer(tokenized, return_tensors="pt")["input_ids"]
|
62 |
print(tokenizer.batch_decode(tokenized)[0])
|
|
|
56 |
messages.append({"role": "user", "content": message})
|
57 |
|
58 |
|
59 |
+
tokenized = tokenizer.apply_chat_template(messages, return_tensors="pt", add_generation_prompt=True).to("cuda") #, tokenize=False) #
|
60 |
#print(tokenized)
|
61 |
#tokenized = tokenizer(tokenized, return_tensors="pt")["input_ids"]
|
62 |
print(tokenizer.batch_decode(tokenized)[0])
|