alfonsovelp commited on
Commit
00a96ec
1 Parent(s): 5c4a967

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -48,8 +48,11 @@ def generate(
48
 
49
 
50
 
 
 
 
51
 
52
- inputs = tokenizer.apply_chat_template(formatted_prompt, return_tensors="pt")
53
  stream = model.generate(inputs, **generate_kwargs, stream=True, details=True, return_full_text=False)
54
  output = ""
55
 
 
48
 
49
 
50
 
51
+ messages = [
52
+ {"role": "user", "content": prompt}
53
+ ]
54
 
55
+ inputs = tokenizer.apply_chat_template(messages, return_tensors="pt")
56
  stream = model.generate(inputs, **generate_kwargs, stream=True, details=True, return_full_text=False)
57
  output = ""
58