alfredplpl commited on
Commit
07ef311
·
verified ·
1 Parent(s): a20a7a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -69,12 +69,12 @@ def chat_llama3_8b(message: str,
69
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
70
  conversation.append({"role": "user", "content": message})
71
 
72
- input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt").to(model.device)
73
 
74
  streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
75
 
76
  generate_kwargs = dict(
77
- input_ids= input_ids,
78
  streamer=streamer,
79
  max_new_tokens=max_new_tokens,
80
  do_sample=True,
 
69
  conversation.extend([{"role": "user", "content": user}, {"role": "assistant", "content": assistant}])
70
  conversation.append({"role": "user", "content": message})
71
 
72
+ input_ids = tokenizer.apply_chat_template(conversation, return_tensors="pt")
73
 
74
  streamer = TextIteratorStreamer(tokenizer, timeout=10.0, skip_prompt=True, skip_special_tokens=True)
75
 
76
  generate_kwargs = dict(
77
+ input_ids= input_ids.to(model.device),
78
  streamer=streamer,
79
  max_new_tokens=max_new_tokens,
80
  do_sample=True,