Update README.md
Browse files
README.md
CHANGED
@@ -39,7 +39,7 @@ text = "The model was fine-tuned using knowledge distillation techniques. The tr
|
|
39 |
prompt = f"Translate input sentence to Korean \n### Input: {text} \n### Translated:"
|
40 |
|
41 |
# Tokenize and generate translation
|
42 |
-
input_ids = tokenizer(
|
43 |
outputs = model.generate(**input_ids, max_new_tokens=1024)
|
44 |
out_message = tokenizer.decode(outputs[0][len(input_ids["input_ids"][0]):], skip_special_tokens=True)
|
45 |
|
|
|
39 |
prompt = f"Translate input sentence to Korean \n### Input: {text} \n### Translated:"
|
40 |
|
41 |
# Tokenize and generate translation
|
42 |
+
input_ids = tokenizer(prompt, return_tensors="pt").to(model.device)
|
43 |
outputs = model.generate(**input_ids, max_new_tokens=1024)
|
44 |
out_message = tokenizer.decode(outputs[0][len(input_ids["input_ids"][0]):], skip_special_tokens=True)
|
45 |
|