Jofthomas HF staff commited on
Commit
e09ef32
·
verified ·
1 Parent(s): 885e92b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -427,7 +427,9 @@ def get_beam_search_html(
427
  length_penalty=-3.0,
428
  num_return_sequences=3
429
  ):
430
- inputs = tokenizer([input_text], return_tensors="pt")
 
 
431
 
432
  outputs = model.generate(
433
  **inputs,
 
427
  length_penalty=-3.0,
428
  num_return_sequences=3
429
  ):
430
+ input_with_template=f"<|im_start|>system /n You are a helpful chatbot.<|im_end|><|im_start|>{input_text}"
431
+
432
+ inputs = tokenizer([input_with_template], return_tensors="pt")
433
 
434
  outputs = model.generate(
435
  **inputs,