TiberiuCristianLeon commited on
Commit
18980c7
·
verified ·
1 Parent(s): bb9e9af

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -64,7 +64,7 @@ def teuken(model_name, sl, tl, input_text):
64
  )
65
  translation_prompt = f"Translate the following text from {sl} into {tl}: {input_text}"
66
  messages = [{"role": "User", "content": translation_prompt}]
67
- prompt_ids = tokenizer.apply_chat_template(messages, chat_template="EN", tokenize=True, add_generation_prompt=True, return_tensors="pt")
68
  prediction = model.generate(
69
  prompt_ids.to(model.device),
70
  max_length=512,
 
64
  )
65
  translation_prompt = f"Translate the following text from {sl} into {tl}: {input_text}"
66
  messages = [{"role": "User", "content": translation_prompt}]
67
+ prompt_ids = tokenizer.apply_chat_template(messages, chat_template="EN", tokenize=True, add_generation_prompt=False, return_tensors="pt")
68
  prediction = model.generate(
69
  prompt_ids.to(model.device),
70
  max_length=512,