manjunathshiva commited on
Commit
88c32bd
·
verified ·
1 Parent(s): fe93c00

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -18,7 +18,7 @@ def generate_text(prompt, max_length, temperature):
18
  {"role": "system", "content": "You are a helpful assistant."},
19
  {"role": "user", "content": prompt}
20
  ]
21
- formatted_prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=True, tokenize=False)
22
 
23
  inputs = tokenizer(formatted_prompt, return_tensors="pt").to(model.device)
24
 
 
18
  {"role": "system", "content": "You are a helpful assistant."},
19
  {"role": "user", "content": prompt}
20
  ]
21
+ formatted_prompt = tokenizer.apply_chat_template(messages, add_generation_prompt=False, tokenize=False)
22
 
23
  inputs = tokenizer(formatted_prompt, return_tensors="pt").to(model.device)
24